필터 지우기
필터 지우기

Plotting color separation of an RGB image

조회 수: 1 (최근 30일)
Tero
Tero 2020년 9월 16일
댓글: Tero 2020년 9월 17일
Hi all,
I have two RGB photos of a beam of light on a wall that is separated into its colors by a prism. One can see the other picture shows more distinct and clear color separation in the horizontal direction, compared to the other, which is more smooth in nature. Question is, what would be the technique to plot this difference we see? I'm looking for a simple method to show on a single plot (or equivalent) that one is more gradual, and the other is more discrete. Any ideas?
Thanks in advance,
Tero

채택된 답변

Tero
Tero 2020년 9월 17일
So, I came up with a different approach, but not sure how scientific this is. I converted both images to Lab color space, and calculated the color difference (Euclidian mean) to the "white point", which I defined for both images to be around the center of the whitest region. Now we can observe a greater derivative for the image with more clear color transitions - red plot, while the blue plot keeps it more flat.
Be free to argue, but unless none, I will accept my answer :)
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 9월 17일
Tero
Tero 2020년 9월 17일
Got it, Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2020년 9월 16일
(First step is to break that combined image that you posted into two images. I assume that your original source already has it as two images.)
Convert each image to HSV using rgb2hsv(), and take the mean hue of each column -- mean(HSV(:,:,1),1) .
Now plot the two mean_hue lines. The first of them shows an **increase* in Hue before the cliff, whereas the second of them shows a decrease in Hue in that section.
Quantifying the meaning of this might be difficult.
  댓글 수: 1
Tero
Tero 2020년 9월 16일
Thanks for answering. I followed your instructions and the result is below. Blue plot is the upper of the two photos, and red plot is the bottom one. I guess it does the job, assuming the reader is aware of hue and color wheels. Otherwise the intuitiveness can become a problem, at least on an excecutive level :)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Orange에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by