Abstract: Disclosed is a method for detecting at least one analyte in a sample, which comprises applying a variable optical filter, comprising a chemochromic material that is sensitive to the analyte, to an optical lens of a camera, an optical lens of a multi-cell photosensor and/or to a multi-cell photosensor, contacting at least part of the chemochromic material with the sample, exposing at least part of the variable optical filter to electromagnetic radiation after at least part of the chemochromic material was exposed to the sample to obtain digital data regarding the chemochromic material that was contacted with the sample and processing the digital data and comparing said digital data with a reference.