Info

This question is closed. Reopen it to edit or answer.

compressing the intensity scalr of RGB image

2 views (last 30 days)
hamidreza mohafez
hamidreza mohafez on 4 Jul 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi and good day As I explained before in my last question, I have some images taken from Diabetic foot ulcers at the same lighting condition (e.g. the attached file dz1.jpg). I am going to do the image segmentation through bin clustering of 3D RGB histogram. In per-processing, first of all the image will be smoothed by an average filter and then I want to eliminate the extreme bright and extreme dark pixels. In one article (attached pdf file) suggested that remapping the unscaled intensity I=R+G+B, of range 0-765 to a narrower range of 300-490 (the values 300,490 were found empirically), that is pixels with I=R+G+B<300 or I>490 should be mapped to I=300 and I=490 respectively and the pixels with 300<I<490 should be mapped to range of 300-490 linearly (same as gamma=1 in imadjust). Actually, the image analyst proposed the following commands redChannel = double(rgbImage(:, :, 1)); greenChannel = double(rgbImage(:, :, 2)); blueChannel = double(rgbImage(:, :, 3)); % Display the individual color channels. subplot(2, 4, 2); imshow(redChannel, []); title('Red Channel of Original Image', 'FontSize', fontSize); subplot(2, 4, 3); imshow(greenChannel, []); title('Green Channel of Original Image', 'FontSize', fontSize); subplot(2, 4, 4); imshow(blueChannel, []); title('Blue Channel of Original Image', 'FontSize', fontSize);
magnitudeImage = sqrt(redChannel .^2 + greenChannel .^2 + blueChannel.^2); subplot(2, 4, 5); imshow(magnitudeImage, []); title('Magnitude Image');
normRed = redChannel ./ magnitudeImage; normGreen = greenChannel ./ magnitudeImage; normBlue = blueChannel ./ magnitudeImage; subplot(2, 4, 6); imshow(normRed, []); title('Normalized Red Image'); subplot(2, 4, 7); imshow(normGreen, []); title('Normalized Green Image'); subplot(2, 4, 8); imshow(normBlue, []); title('Normalized Blue Image');
which are quite helpful; however, there are still some problems remaining: 1.The proposed method is worked on color components (R,G,B) individually and not as a whole. 2.As it is shown in Attached Matlab output file the images which is achieved through applying the proposed commands are washed away. So, I really appreciate if anyone can help even to implement the proposed method mentioned in the attached article (which I explained in the beginning) or if you have any idea for eliminating the extreme bright or extreme dark pixels for my attached image (with the least loosing information rate) or even if you think my image does not need such a per-processing method. Bests
<<
>>
Bests

Answers (0)

Community Treasure Hunt

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

Start Hunting!