extracting the channels from the corrected image

4 次查看(过去 30 天)
iam working with rgb fundus images
my task is to convert the rgb image to hsv space and extract the channels and
perform brightness correction in the image
now i am little confused on how to extract the channels of the corrected image
the corrected image is not saved as jpg format
could anyone help me to solve this issue
i have also attached the coding
thank you in advance

回答(1 个)

Ameer Hamza
Ameer Hamza 2020-4-12
You converted the image to RGB after applying correction. You can extract the RGB channels by indexing along third dimension
R = newRGBImage(:,:,1);
G = newRGBImage(:,:,2);
B = newRGBImage(:,:,3);
  29 个评论
LAXMI PRIYANKA
LAXMI PRIYANKA 2020-4-15
sir now i tried with adaphist function for applying clahe
[f_name p_name]=uigetfile('*','select the image');
input_img=imresize(imread(strcat(p_name,f_name)),[512,512]);
imshow(input_img),title('Input Image');
[xRes,yRes]=size(input_img);
Min=0;
Max=255;
NrX=2;
NrY=2;
NrBins=256;
Cliplimit=0.01;
% I = imread('tire.tif');
J = adapthisteq(im2uint8(input_img),'clipLimit',0.02,'Distribution','rayleigh');
imshowpair(im2uint8(input_img),J,'montage');
title('Original Image (left) and Contrast Enhanced Image (right)')
the abve codings after execution displays the following error
Error using adapthisteq
Expected input number 1, I, to be two-dimensional.
Error in adapthisteq>parseInputs (line 416)
validateattributes(I, {'uint8', 'uint16', 'double', 'int16', 'single'}, ...
Error in adapthisteq (line 154)
[I, selectedRange, fullRange, numTiles, dimTile, clipLimit, numBins, ...

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Processing and Computer Vision 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by