From: megha bhatt on 30 May 2010 16:20 I have a Hyperspectral image with dimension (5001, 257,64), It means 5001 samples, 257 lines and 64 bands. I want to create a ROI from the image and want to find the mean spectrum from this ROI. I have approached as below: imshow(img.rad(:,:,50),'Border','tight','DisplayRange',[img.mindrange,img.maxdrange],'XData', img.xlims,'YData',img.ylims); axis on axis xy h_img = imfreehand(gca); BW = createMask(h_img); [row,col] = find(BW==1); Now I have the row and columns indexes which are within the mask but now I am not getting how to get mean spectra. Thanks, Megha
From: megha bhatt on 31 May 2010 09:05 "megha bhatt" <mubhatt19(a)yahoo.co.in> wrote in message <htuh9l$omc$1(a)fred.mathworks.com>... > I have a Hyperspectral image with dimension (5001, 257,64), It means 5001 samples, 257 lines and 64 bands. I want to create a ROI from the image and want to find the mean spectrum from this ROI. I have approached as below: > imshow(img.rad(:,:,50),'Border','tight','DisplayRange',[img.mindrange,img.maxdrange],'XData', img.xlims,'YData',img.ylims); > axis on > axis xy > h_img = imfreehand(gca); > BW = createMask(h_img); > [row,col] = find(BW==1); > Now I have the row and columns indexes which are within the mask but now I am not getting how to get mean spectra. > > Thanks, > Megha I am still waiting for your suggestions and help....
From: ImageAnalyst on 31 May 2010 09:09 Just get a logical image of your ROI and get the mean of each band - that's one way to do it for k = 1:64 bandKImage = fullSpectralImage(:,:,k); meanOfBandK(k) = mean(bandKImage(logicalMask)); end
|
Pages: 1 Prev: Quadrature Amplitude Modulation in Real-Time Next: Plot 3D |