Color matching/ re-coloring an image

조회 수: 1 (최근 30일)
Thomas
Thomas 2013년 3월 24일
Hello all
I have never explored matLAB's color finding capabilities, but have a need to take an image with varying shades of red and change it to full spectrum. I also have a calibrated scale of what each shade of red means and need to incorporate this data to the newly colored picture as well.
Any help would be wonderful!

답변 (1개)

Image Analyst
Image Analyst 2013년 3월 24일
Convert your rgb image to hsv color space with rgb2hsv. Scale the red from 0 - 0.1 and 0.9 - 1.0 so that it goes from 0-1. It's a bit tricky since the red spans the break at the 0/1 boundary (orangish reds occur less than 0.1 while other purplish reds occur at more than 0.9). Then convert back to rgb color space. Then all the "red" hues will now span the entire color range. That's the basic algorithm, if I understood what you want to do correctly. Give that a shot. Write back if you are having trouble.
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 3월 24일
I think Thomas has a look-up table that converts original red intensity to data value, and so is wanting to detect which hue is present, convert to data, and then reconvert to image with the span of data corresponding to complete red intensity scale.
This could potentially be done as one conversion step instead of two.
Image Analyst
Image Analyst 2013년 3월 24일
Could be. Totally different that what I first assumed. So, I'll just echo his statement back to him: "Any help would be wonderful!" With more and better explanation, perhaps we can git the question figured out and propose a meaningful solution.

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

카테고리

Help CenterFile Exchange에서 Color and Styling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by