Reg color comparison between image and reference spectrum
이전 댓글 표시
Hello All,
I need some advice on comparing colors from an image to a reference spectrum with the ultimate goal of convert the fringe colors ->thickness information.
What I have so far:
1. Using thin film equations, I am able to generate a spectrum which relates color to thickness. Xaxis is in nanometers. File =

2. Generate decent experimental image that shows a similar fringe pattern. File =

To match the color fringes, I wrote a script that does the following:
1. Scan RGB image. Store all (X,Y){RGB} info 2. For each pixel, calculate Lab values. 3. Find the difference (deltaE) of each of these Lab values with my reference spectrum that I have generated to find the closest match.
The problem I am facing is that although the match is not always good. For e.g., in my reference spectrum, at 500nm, the Lab value is (18,29,-29) for purple. However, in my RGB image, the same color is (34,48,-42) which leads to a deltaE of 28.
Since my overall goal is to analyze a video sequence showing changes in thin-film, using k-means to segment the colors doesn't work as well, as the number of colors change in the video sequence.
Any advice/help would be appreciated.
Thanks,
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!