Transform your phone into a pocket spectrometer with just a card and an algorithm.
The human eye is mostly sensitive to only three bands of the electromagnetic spectrum—red, green, and blue (RGB)—in the visible range. In contrast, off-the-shelf smartphone camera sensors are potentially hyperspectral in nature, meaning that each pixel is sensitive to far more spectral bands. Now scientists have found a simple way for any conventional smartphone camera to serve as a hyperspectral sensor—by placing a card with a chart on it within its view. The new patent-pending technique may find applications in defense, security, medicine, forensics, agriculture, environmental monitoring, industrial quality control, and food and beverage quality analysis, the researchers add.
“At the heart of this work is a simple but powerful idea—a photo is never just an image,” says Semin Kwon, a postdoctoral research associate of biomedical engineering Purdue University in West Lafayette, Ind. “Every photo carries hidden spectral information waiting to be uncovered. By extracting it, we can turn everyday photography into science.”
Using a smartphone camera and a spectral color chart, researchers can image the transmission spectrum of high-end whiskey, thus determining its authenticity. Semin Kwon/Purdue University
Every molecule has a unique spectral signature—the degree to which it absorbs or reflects each wavelength of light. The extreme sensitivity to distinguishing color seen in scientific-grade hyperspectral sensors can help them identify chemicals based on their spectral signatures, for applications in a wide range of industries, such as medical diagnostics, distinguishing authentic versus counterfeit whiskey, monitoring air quality, and nondestructive analysis of pigments in artwork, says Young Kim, a professor of biomedical engineering at Purdue.
Previous research has pursued a number of different ways to recover spectral details from conventional smartphone RGB camera data. However, machine learning models developed for this purpose typically rely heavily on the task-specific data on which they are trained. This limits their generalizability and makes them susceptible to errors resulting from variations in lighting, image file formats, and more. Another possible avenue involved special hardware attachments, but these can prove expensive and bulky.
In the new study, the scientists designed a special color reference chart that can be printed on a card. They also developed an algorithm that can analyze smartphone pictures taken with this card and account for factors such as lighting conditions. This strategy can extract hyperspectral data from raw images with a sensitivity of 1.6 nanometers of difference in wavelength of visible light, comparable to scientific-grade spectrometers.
“In short, this technique could turn an ordinary smartphone into a pocket spectrometer,” Kim says.
The scientists are currently pursuing applications for their new technique in digital and mobile-health applications in both domestic and resource-limited settings. “We are truly excited that this opens the door to making spectroscopy both affordable and accessible,” Kwon says.
The scientists recently detailed their findings in the journal IEEE Transactions on Image Processing.
This is really cool and very clever. But i want to raise one thing.
> designed a special color reference chart that can be printed on a card
My rudimentary understanding of physics makes me suspect this sentence is a simplification.
A normal printer use Cyan Magenta Yellow Black to print. A photo of such a print would already destroy alot of spectral information for the same reason the individual rgb sensors do.
So i suspect those colored dots are a very careful and deliberate concoction of very particular inks with very specific spectral color bands.
I suspect alot of effort went into finding, mixing and algoritmically combining the right inks.
I'm guessing it works similarly to a how a narrow band florescent lamp makes only materials that reflect a very specific frequency be visible, which makea alot of prints and pigments look wierd. (If you do the opposite; use ink with very specific spectral band, you can instead measure the lamp)
Insanely clever. (Whatever they did)
Not just that, but it would presumably be sensitive to light emission spectra too. As inks can only reflect wavelengths of light that hit them, if the emission spectra has spikes or gaps - think LED or florescent - the reflected spectra will be a function of the light source[1].
Perhaps there's some accounting for this, and I'm curious to learn what it is, because it's a phenomenally complex problem.
1. You might think the sun is a standard source, but it's usually modulated by the atmosphere[2].
2. Unless you are in space.
> Perhaps there's some accounting for this, and I'm curious to learn what it is
The slip itself is a calibration reference, so a clean photo of it could serve to compensate for the lamp and camera and calculate how accurate the readings is for different parts of the spectrum. (But good wide spectrum light would be ideal for high precision readout)
You're also still limited to visible light because of the camera uv and ir filter, for which the sun is a decent reference.
oh, yes of course! Thank you :)
I don't think the sun is even a perfect source when you're in space, doesn't it have gaps in its emission spectra from the gasses that make it up?
You are quite right, I had no idea.
"Between around 10,000 nm (far infrared) and around 100 nm (deep ultraviolet), the spectrum of the Sun's spectral irradiance agrees reasonably well (though not perfectly) with that of a blackbody radiator at about 5,700K. That is about the temperature of the Sun's photosphere. The deviation from a perfect blackbody spectrum is due to many factors, including the absorption of light by constituents of the solar atmosphere, and the fact that the photosphere is not uniform, but has some hotter and some cooler regions, so that what is seen from the Earth is a composite spectrum of blackbody radiators at a range of different temperatures. About 99% of the total electromagnetic radiation coming from the Sun is in the ultraviolet-visible-infrared region."
https://acd-ext.gsfc.nasa.gov/anonftp/acd/daac_ozone/Lecture...
https://ieeexplore.ieee.org/ielx8/83/10795784/11125864/supp1...
We utilized a professional photographic inkjet printer (ImagePROGRAF PRO-1000, Canon), equipped with 11 ink cartridges and a chroma optimizer (PFI-1000 LUCIA PRO Ink, Canon), and used the manufacturer-recommended genuine paper (Photo Paper Premium Fine Art Smooth, Canon) for printing. To reproduce the desired reference colors for the spectral color chart, we also implemented a customized printing calibration process while maintaining the International Color Consortium (ICC) profile. The actual printed colors (output) showed notable distortions compared with the intended colors (input), which were particularly influenced by the type of paper (print sheet). For customized printing calibration, we mapped the exact relationship of the CIE xy chromaticity values between the digital color input and printed output values. After the printing process was completed, we measured the reflectance spectra of all reference colors from the printed spectral color chart (Fig. S1) using a spectrometer and a diffuse reflectance standard (equivalent to using CIE illuminant E). We confirmed that the CIE xy chromaticity values obtained from these measurements were in excellent agreement with the desired input values within the SWOP v2 gamut (Fig. 1(e)).
Based on supplementary material "We utilized a professional photographic inkjet printer (ImagePROGRAF PRO-1000, Canon), equipped with 11 ink cartridges and a chroma optimizer". Not your typical office printer but nowhere near as exotic as you might expect.
?
they are not four but twelve different (!) base colors. they are calibrated and are very light proof i.e. degrade much slower over time, "look the same" after years.
what's your background in understanding how printing works?
I have to assume it used inks available from Canon. Making your own inks is a research project on its own, so my guess is that would have been mentioned.
They are special in the sense that they are calibrated and QA'd for professional use
Wouldn't it be nice if they just told us so we didn't have to speculate? This is cool stuff and I'm glad I know about it but, as someone interested in this field of study, I'd love to try this out. But I guess I should stop being surprised when even a company like IEEE can't be bothered to write an article with any actual information. Just a bunch of simplified summarized crap.
At the bottom of the article is a link to the paper, which is open access.
I missed that! Thank you!
I was initially surprised too, but I think there is a some trick...
I'm not sure what happens on paper, but when you have ink disolved in water the abortion is not linearly proportional to the concentration, it's exponential. For example, consider a red ink and 5 magical selected frequencies and the absortions at 1% of concentration are: 99%, 99%, 50%, 10%, 1%
If you double the ink at 2% you get 99.99%, 99.99%, 75%, 19%, 1.99%
So increasing or decreasing the ink concentration may give you information of different frequencies, even with only one ink and only one sensor. In this case mostly about the 3rd and 4th. With more concentration you may kill all the light in the 3rd and measure the absortions ratio between the 4th and the 5th.
One problem I see here is how to order them, but I guess it's possible with a few sensors and a few inks. Each sensor sees all the frequencies, but with different weight. I'm not sure if it's possible to solve this, but perhaps you need some initial approximated model of the inks(???).
Now, when you put the inks on paper and have a unreliable light source and perhaps other technical problems, ...
In conclusion, I think it's possible to use different saturation and mixes of the inks to get different spectral distribution of the light that bounce on the card. Then use the three sensors to get three averages and try to use big linear algebra book to reconstruct what happens in between. But I should read the paper to be sure.
I would assume that with time, you could just print it on a generic $30 inkjet, and calibrate the card, sensor, and whitelte balance to a stored reference image.
It won't be as accurate, but it might be enough to offer some insights into whether liquid photographed in the article is in fact whisky, not urine (which to me seems to be a much more noble demonstration subject).
Ink is perfectly capable of being a phosphor, in which case it'll up or down convert wavelength X to wavelength Y.
My gut feeling is that finding enough very specific wavelength shifting inks would be harder. Perhaps its a mix though to get good readings in the faar edges between the rgb wavelengths.
I hope there is a research paper on this i can read.
I expect rolling shutters to be a far larger issue. Haven't read the article a second time, but non-uniform and inconsistent lighting is a huge challenge for this kind of work.
Printing can use so-called spot colors.
I similarly thought that just because they said print does not mean it was printed on someone's ink jet. I'd hate to see how many different Pantone colors might be necessary.
If you only need one card per 10,000 photos, then the cost of the card starts to look cheap compared to a spectrometer and its bulk.
This doesn't really seem like "hyperspectral imaging". I think the idea is having a reference colour chart of known emission characteristics and photographing it through a transparent substance gives you an idea of how much that substance attenuates each wavelength.
It's a cool trick if it works, but it seems very finicky and I guess would be limited to transparent/homogeneous liquids?
On top of that it only works in the VIS range, thanks to the filters in front of the camera sensors - and most of the interesting information is in UV or IR. VIS only contains information about a few elements. (see Fraunhofer lines https://en.wikipedia.org/wiki/Fraunhofer_lines)
In theory maybe you could build a version made of inks printed on a reflective mirror? And then you would hold the mirror so it reflected the object into the camera?
But that seems far more difficult. Precisely combining and applying combinations of inks to a mirrored surface sounds like a helluva manufacturing challenge.
I think ink and mirrors are kind of fundamentally incompatible.
Probably closer to what you're thinking about would be putting a bunch of tiny bandpass filters infront of a mirror, but in that case you can ditch the mirror entirely and just point the camera through the filter array.
A filter array right on-top of the sensor is how (the vast majority) of) CMOS cameras distinguish colour anyway.
> The new patent-pending technique
> “Every photo carries hidden spectral information waiting to be uncovered. By extracting it, we can turn everyday photography into science.”
And with our patent, extract rent from anyone who wants to do it!
That's a bit of a bad faith take. You were welcome to go spend the years(?) this chaps dedicated to putting together the research required to build this. If it works, let him enjoy the fruits of labour.
Sure, if he'd come up with this primarly using his own resources and time, but he discovered this whilst being paid to conduct research at a public university, a form of institution which is explicitly intended to disseminate knowledge. Society should enjoy the fruits of its investment.
Would the university have been willing to invest in the exotic printer and the labor to do the work without the potential upside of a patent?
It’s very easy to declare that someone else “should” do a bunch of work and spend a bunch of money for the altruistic benefit of society.
Patents do more than let you enjoy the fruits of your labor - the market already allows for that. Patents use the force of law to bar anyone else who might have discovered the same thing from building upon it.
Imagine you are just a dude, you did all this work, and go to "market".
You are just a dude, therefore business grows slowly.
You gather enough attention that some corporation with a lot of bling just goes and copies your thing.
Your business fails.
Once can just as trivially construct an argument demonstrating the issue with patents but the problem with this style of argument is that patents are not a simple thing. They have global far reaching effects. The government distributing a monopoly on information is a serious interference with the market, and due to patent harmonization efforts across the world, one person filing a patent in New Jersey affects even people in Kenya and Turkey and Thailand. The arguments for patents are often, as I see it, based on a deeply flawed understanding of the motivations of innovators and the affects of open information on innovation. For example most arguments in favor of patents cannot explain how open source works, and so are clearly incomplete or outright wrong.
>For example most arguments in favor of patents cannot explain how open source works, and so are clearly incomplete or outright wrong.
Can you clarify this? Just curious about what you mean.
I often speak to people who say that no one would innovate without government-secured monopoly on information, and this is clearly false as open source works without this monopoly. As such it seems to me that people who make that claim don’t understand how innovation works.
Often I say that if we phased out patents and other IP restrictions, then investments would not stop but they would change from less frequent large investments to more frequent small investments. As long as designs can stay secret until release, there will always be first mover advantage and brand recognition. But you might get smaller investments to build out manufacturing for the next year, rather than bigger longer term investments. The flip side is that stagnant innovators who got lucky once will be subsumed by more agile competitors who can better deliver those innovations to market.
Thus investment and innovation wouldn’t stop - markets still ensure certain advantages for innovators - but the nature of investment and innovation wouldn’t shift towards more incremental moves and more diverse actors. A major upside to this is that those best suited to scale an existing nascent technology would be free to compete at doing so.
It should be noted that even die hard capitalists are against IP restrictions [1] as they are a massive government investment in the market. So proponents of IP restrictions must reconcile their arguments in favor of this government intervention with their potential interest in free markets.
Yeah, I do agree with that. Same with the rationale for copyright.
I mean it sure sounds like the old “science can’t explain how bumblebees fly, therefore science is incomplete or outright wrong” argument. Which is of course just false.
I replied so feel free to read that.
you have it entirely backwards; patents dont protect just-a-dude, they protect the corporation.
how?
just-a-dude doesn't have a team of patent attorneys sitting in his back office waiting for work.
On the other hand those same corporations can generate, file, and litigate more patents than just a dude could ever hope to.
It's 2007. Just-a-dude has a great idea, he notices customers to his website often buy just one item, so he'll let them do that with one simple click. What's this, he's just received a cease and desist? Sorry bro, Amazon patented that 10 years ago.
I mean we’re basically getting the same result. Tons of businesses, not to mention patent trolls, constantly harass individuals and small businesses trying to get their foot in the door or just run a small, sustainable business. Hell forget my business failing, it’s possible I’ll never even get to try my idea out!
There is not much labor here. Anyone should be able to engineer a model by using deep learning over pictures that map raw images to their hyperspectral variants in various settings, including in adversarial settings that are intended to confuse. All you would need is a sufficiently large and diverse dataset.
I seriously doubt using the word rent in reference to patent license royalties is new
"Rent-seeking" is square 3B on my HN bingo card. See also:
Regulatory capture
Late-stage capitalism
Walled garden
An/The unreasonable...
So...
Period. Full stop
I Mean…
Streisand effect
orthogonal
trivial
non-trivial
{$person}'s Law | Axiom | Razor | Paradox
Objectively
Ship of Theseus
Gatekeeping
It’s like the opposite of traditional tech buzzword bingo where you raise VC for blockchain crypto AI agents.
Instead, anything you don’t like is a rent-seeking late stage capitalism narrative.