From: subrajeet Mohapatra on 31 Mar 2010 08:13 Hi I need to separate the WBC(white blood cells) from the RBC and other components in an blood smear microscope image. How can I do that using image segmentation technique. I need only the blue stained WBC. Image link is: http://www.healthsystem.virginia.edu/internet/hematology/HessEDD/MalignantHematologicDisorders/Leukemias/ALL-L1.cfm Please reply
From: ImageAnalyst on 31 Mar 2010 09:09 subrajeet Mohapatra: A slight modification of my demo on simple color detection: http://www.mathworks.com/matlabcentral/fileexchange/26420-simplecolordetection will find the blue stained cells. After this you'll need to do marker controlled watershed segmentation (it's in the Image Processing Toolbox demos) to split apart touching cells. Be sure to join any lines split apart by the newsreader!!!!! %---------------------------------------------------------------------------------- % Demo macro to very, very simple color detection in RGB color space % by ImageAnalyst function SimpleColorDetection() clc; % Clear the command window. ver % Display their toolboxes in the command window. % Introduce the demo, and ask user if they want to continue or exit. message = sprintf('This demo will illustrate very simple color detection in RGB color space.\nIt requires the Image Processing Toolbox.\nDo you wish to continue?'); reply = questdlg(message, 'Run Demo?', 'OK','Cancel', 'OK'); if strcmpi(reply, 'Cancel') % User canceled so exit. return; end % Check that user has the Image Processing Toolbox installed. versionInfo = ver; % Capture their toolboxes in the variable. hasIPT = false; for k = 1:length(versionInfo) if strcmpi(versionInfo(k).Name, 'Image Processing Toolbox') > 0 hasIPT = true; end end if ~hasIPT % User does not have the toolbox installed. message = sprintf('Sorry, but you do not seem to have the Image Processing Toolbox.\nDo you want to try to continue anyway?'); reply = questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes'); if strcmpi(reply, 'No') % User said No, so exit. return; end end % Continue with the demo. Do some initialization stuff. close all; fontSize = 16; figure; % Maximize the figure. set(gcf, 'Position', get(0, 'ScreenSize')); % Change the current folder to the folder of this m-file. % (The line of code below is from Brett Shoelson of The Mathworks.) if(~isdeployed) cd(fileparts(which(mfilename))); end % They want to pick their own. % Change default directory to the one containing the standard demo images for the MATLAB Image Processing Toolbox. originalFolder = pwd; folder = 'C:\Program Files\MATLAB\R2010a\toolbox\images\imdemos'; if ~exist(folder, 'dir') folder = pwd; end cd(folder); % Browse for the image file. [baseFileName, folder] = uigetfile('*.*', 'Specify an image file'); fullImageFileName = fullfile(folder, baseFileName); % Set current folder back to the original one. cd(originalFolder); % Check to see that the image exists. (Mainly to check on the demo images.) if ~exist(fullImageFileName, 'file') message = sprintf('This file does not exist:\n%s', fullImageFileName); uiwait(msgbox(message)); return; end % Read in image into an array. [rgbImage storedColorMap] = imread(fullImageFileName); [rows columns numberOfColorBands] = size(rgbImage); % If it's monochrome (indexed), convert it to color. if numberOfColorBands == 1 rgbImage = ind2rgb(rgbImage, storedColorMap); % rgbImage = cat(3, rgbImage, rgbImage, rgbImage); end % Check to see if it's an 8-bit image needed later for scaling). if strcmpi(class(rgbImage), 'uint8') % Flag for 256 gray levels. eightBit = true; else eightBit = false; end % Display the original image. subplot(3, 4, 1); imshow(rgbImage); drawnow; % Make it display immediately. if numberOfColorBands > 1 title('Original Color Image', 'FontSize', fontSize); else caption = sprintf('Original Monochrome Image\n(converted to color)'); title(caption, 'FontSize', fontSize); end % Extract out the color bands from the original image % into 3 separate 2D arrays, one for each color component. redBand = rgbImage(:, :, 1); greenBand = rgbImage(:, :, 2); blueBand = rgbImage(:, :, 3); % Display them. subplot(3, 4, 2); imshow(redBand); title('Red Band', 'FontSize', fontSize); subplot(3, 4, 3); imshow(greenBand); title('Green Band', 'FontSize', fontSize); subplot(3, 4, 4); imshow(blueBand); title('Blue Band', 'FontSize', fontSize); message = sprintf('These are the individual color bands.\nNow we will compute the image histograms'); uiwait(msgbox(message)); fontSize = 13; % Compute and plot the red histogram. hR = subplot(3, 4, 6); [countsR, grayLevelsR] = imhist(redBand); maxGLValueR = find(countsR > 0, 1, 'last'); maxCountR = max(countsR); bar(countsR, 'r'); grid on; xlabel('Gray Levels'); ylabel('Pixel Count'); title('Histogram of Red Band', 'FontSize', fontSize); % Compute and plot the green histogram. hG = subplot(3, 4, 7); [countsG, grayLevelsG] = imhist(greenBand); maxGLValueG = find(countsG > 0, 1, 'last'); maxCountG = max(countsG); bar(countsG, 'g'); grid on; xlabel('Gray Levels'); ylabel('Pixel Count'); title('Histogram of Green Band', 'FontSize', fontSize); % Compute and plot the blue histogram. hB = subplot(3, 4, 8); [countsB, grayLevelsB] = imhist(blueBand); maxGLValueB = find(countsB > 0, 1, 'last'); maxCountB = max(countsB); bar(countsB, 'b'); grid on; xlabel('Gray Levels'); ylabel('Pixel Count'); title('Histogram of Blue Band', 'FontSize', fontSize); % Set all axes to be the same width and height. % This makes it easier to compare them. maxGL = max([maxGLValueR, maxGLValueG, maxGLValueB]); if eightBit maxGL = 255; end maxCount = max([maxCountR, maxCountG, maxCountB]); axis([hR hG hB], [0 maxGL 0 maxCount]); % Plot all 3 histograms in one plot. subplot(3, 4, 5); plot(grayLevelsR, countsR, 'r', 'LineWidth', 2); grid on; xlabel('Gray Levels'); ylabel('Pixel Count'); hold on; plot(grayLevelsG, countsG, 'g', 'LineWidth', 2); plot(grayLevelsB, countsB, 'b', 'LineWidth', 2); title('Histogram of All Bands', 'FontSize', fontSize); maxGrayLevel = max([maxGLValueR, maxGLValueG, maxGLValueB]); % Trim x-axis to just the max gray level on the bright end. if eightBit xlim([0 255]); else xlim([0 maxGrayLevel]); end % Now select thresholds for the 3 color bands. message = sprintf('Now we will select some color threshold ranges\nand display them over the histograms.'); uiwait(msgbox(message)); % Assign the low and high thresholds for each color band. % Use values that I know work. redThresholdLow = 0; redThresholdHigh = 196; greenThresholdLow = 0; greenThresholdHigh = 155; blueThresholdLow = 0; blueThresholdHigh = 10; % Show the thresholds as vertical red bars on the histograms. PlaceThresholdBars(6, redThresholdLow, redThresholdHigh); PlaceThresholdBars(7, greenThresholdLow, greenThresholdHigh); PlaceThresholdBars(8, blueThresholdLow, blueThresholdHigh); message = sprintf('Now we will apply each color band threshold range to the color band.'); uiwait(msgbox(message)); % Now apply each color band's particular thresholds to the color band redMask = (redBand >= redThresholdLow) & (redBand <= redThresholdHigh); greenMask = (greenBand >= greenThresholdLow) & (greenBand <= greenThresholdHigh); % Display the thresholded binary images. fontSize = 16; subplot(3, 4, 10); imshow(redMask, []); title('Is-Red Mask', 'FontSize', fontSize); subplot(3, 4, 11); imshow(greenMask, []); title('Is-Not-Green Mask', 'FontSize', fontSize); subplot(3, 4, 12); % Combine the masks to find where all 3 are "true." % Then we will have the mask of only the red parts of the image. cellMask = uint8(redMask & greenMask); subplot(3, 4, 9); imshow(cellMask, []); caption = sprintf('Mask of Only\nThe Bluish Objects'); title(caption, 'FontSize', fontSize); % Tell user that we're going to filter out small objects. smallestAcceptableArea = 100; % Keep areas only if they're bigger than this. message = sprintf('Note the small regions in the image in the lower left.\nNext we will eliminate regions smaller than %d pixels.', smallestAcceptableArea); uiwait(msgbox(message)); % Open up a new figure, since the existing one is full. figure; % Maximize the figure. set(gcf, 'Position', get(0, 'ScreenSize')); % Get rid of small objects. Note: bwareaopen returns a logical. cellMask = uint8(bwareaopen(cellMask, smallestAcceptableArea)); subplot(3, 3, 1); imshow(cellMask, []); fontSize = 13; caption = sprintf('bwareaopen() removed objects\nsmaller than %d pixels', smallestAcceptableArea); title(caption, 'FontSize', fontSize); % Smooth the border using a morphological closing operation, imclose(). structuringElement = strel('disk', 4); cellMask = imclose(cellMask, structuringElement); subplot(3, 3, 2); imshow(cellMask, []); fontSize = 16; title('Border smoothed', 'FontSize', fontSize); % Fill in any holes in the regions, since they are most likely red also. cellMask = uint8(imfill(cellMask, 'holes')); subplot(3, 3, 3); imshow(cellMask, []); title('Regions Filled', 'FontSize', fontSize); message = sprintf('This is the filled, size-filtered mask.\nNow we will apply this mask to the original image'); uiwait(msgbox(message)); % You can only multiply integers if they are of the same type. % (cellMask is a logical array.) % We need to convert the type of cellMask to the same data type as redBand. strDataType = class(redBand); cellMask = eval([strDataType '(cellMask)']); % Use the red object mask to mask out the red-only portions of the rgb image. maskedImageR = cellMask .* redBand; maskedImageG = cellMask .* greenBand; maskedImageB = cellMask .* blueBand; % Show the masked off red image. subplot(3, 3, 4); imshow(maskedImageR); title('Masked Red Image', 'FontSize', fontSize); % Show the masked off green image. subplot(3, 3, 5); imshow(maskedImageG); title('Masked Green Image', 'FontSize', fontSize); % Show the masked off blue image. subplot(3, 3, 6); imshow(maskedImageB); title('Masked Blue Image', 'FontSize', fontSize); % Concatenate the masked color bands to form the rgb image. maskedRGBImage = cat(3, maskedImageR, maskedImageG, maskedImageB); % Show the masked off, original image. subplot(3, 3, 8); imshow(maskedRGBImage); fontSize = 13; caption = sprintf('Masked Original Image\nShowing Only the Red Objects'); title(caption, 'FontSize', fontSize); % Show the original image next to it. subplot(3, 3, 7); imshow(rgbImage); title('The Original Image (Again)', 'FontSize', fontSize); message = sprintf('Done!\n\nThe demo has finished.'); uiwait(msgbox(message)); % ---------- End of main function --------------------------------- %---------------------------------------------------------------------------- % Function to show the low and high threshold bars on the histogram plots. function PlaceThresholdBars(plotNumber, lowThresh, highThresh) % Show the thresholds as vertical red bars on the histograms. subplot(3, 4, plotNumber); hold on; maxYValue = ylim; maxXValue = xlim; hStemLines = stem([lowThresh highThresh], [maxYValue(2) maxYValue(2)], 'r'); children = get(hStemLines, 'children'); set(children(2),'visible', 'off'); % Place a text label on the bar chart showing the threshold. annotationTextL = sprintf('%d', lowThresh); annotationTextH = sprintf('%d', highThresh); % For text(), the x and y need to be of the data class "double" so let's cast both to double. text(double(lowThresh + 5), double(0.85 * maxYValue(2)), annotationTextL, 'FontSize', 10, 'Color', [0 .5 0]); text(double(highThresh + 5), double(0.85 * maxYValue(2)), annotationTextH, 'FontSize', 10, 'Color', [0 .5 0]); % Show the range as arrows. % Can't get it to work, with either gca or gcf. % annotation(gca, 'arrow', [lowThresh/maxXValue(2) highThresh/ maxXValue(2)],[0.7 0.7]); return; % from PlaceThresholdBars
From: subrajeet Mohapatra on 18 Apr 2010 02:09 Sir, Thanks for the help but sometimes I am getting an error at the kmeans function part like it is showing empty cluster created at iteration 1. One more problem is I am able t separate the nucleus part from the blood microscope images but we require also the WBC cytoplasm part along with the blue nucleus which the kmeans is unable to separate. The cytoplasm remains along with the red blood cells and we are unable to get it, Subrajeet ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <9e20fc59-3dc6-4707-92b1-182cf375d3ca(a)z39g2000vbb.googlegroups.com>... > subrajeet Mohapatra: > A slight modification of my demo on simple color detection: > http://www.mathworks.com/matlabcentral/fileexchange/26420-simplecolordetection > will find the blue stained cells. After this you'll need to do marker > controlled watershed segmentation (it's in the Image Processing > Toolbox demos) to split apart touching cells. > > Be sure to join any lines split apart by the newsreader!!!!! > > %---------------------------------------------------------------------------------- > > % Demo macro to very, very simple color detection in RGB color space > % by ImageAnalyst > function SimpleColorDetection() > clc; % Clear the command window. > ver % Display their toolboxes in the command window. > % Introduce the demo, and ask user if they want to continue or exit. > message = sprintf('This demo will illustrate very simple color > detection in RGB color space.\nIt requires the Image Processing > Toolbox.\nDo you wish to continue?'); > reply = questdlg(message, 'Run Demo?', 'OK','Cancel', 'OK'); > if strcmpi(reply, 'Cancel') > % User canceled so exit. > return; > end > > % Check that user has the Image Processing Toolbox installed. > versionInfo = ver; % Capture their toolboxes in the variable. > hasIPT = false; > for k = 1:length(versionInfo) > if strcmpi(versionInfo(k).Name, 'Image Processing Toolbox') > 0 > hasIPT = true; > end > end > if ~hasIPT > % User does not have the toolbox installed. > message = sprintf('Sorry, but you do not seem to have the Image > Processing Toolbox.\nDo you want to try to continue anyway?'); > reply = questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes'); > if strcmpi(reply, 'No') > % User said No, so exit. > return; > end > end > > % Continue with the demo. Do some initialization stuff. > close all; > fontSize = 16; > figure; > % Maximize the figure. > set(gcf, 'Position', get(0, 'ScreenSize')); > > % Change the current folder to the folder of this m-file. > % (The line of code below is from Brett Shoelson of The Mathworks.) > if(~isdeployed) > cd(fileparts(which(mfilename))); > end > > % They want to pick their own. > % Change default directory to the one containing the standard demo > images for the MATLAB Image Processing Toolbox. > originalFolder = pwd; > folder = 'C:\Program Files\MATLAB\R2010a\toolbox\images\imdemos'; > if ~exist(folder, 'dir') > folder = pwd; > end > cd(folder); > % Browse for the image file. > [baseFileName, folder] = uigetfile('*.*', 'Specify an image file'); > fullImageFileName = fullfile(folder, baseFileName); > % Set current folder back to the original one. > cd(originalFolder); > > % Check to see that the image exists. (Mainly to check on the demo > images.) > if ~exist(fullImageFileName, 'file') > message = sprintf('This file does not exist:\n%s', > fullImageFileName); > uiwait(msgbox(message)); > return; > end > > % Read in image into an array. > [rgbImage storedColorMap] = imread(fullImageFileName); > [rows columns numberOfColorBands] = size(rgbImage); > % If it's monochrome (indexed), convert it to color. > if numberOfColorBands == 1 > rgbImage = ind2rgb(rgbImage, storedColorMap); > % rgbImage = cat(3, rgbImage, rgbImage, rgbImage); > end > % Check to see if it's an 8-bit image needed later for scaling). > if strcmpi(class(rgbImage), 'uint8') > % Flag for 256 gray levels. > eightBit = true; > else > eightBit = false; > end > % Display the original image. > subplot(3, 4, 1); > imshow(rgbImage); > drawnow; % Make it display immediately. > if numberOfColorBands > 1 > title('Original Color Image', 'FontSize', fontSize); > else > caption = sprintf('Original Monochrome Image\n(converted to color)'); > title(caption, 'FontSize', fontSize); > end > > % Extract out the color bands from the original image > % into 3 separate 2D arrays, one for each color component. > redBand = rgbImage(:, :, 1); > greenBand = rgbImage(:, :, 2); > blueBand = rgbImage(:, :, 3); > % Display them. > subplot(3, 4, 2); > imshow(redBand); > title('Red Band', 'FontSize', fontSize); > subplot(3, 4, 3); > imshow(greenBand); > title('Green Band', 'FontSize', fontSize); > subplot(3, 4, 4); > imshow(blueBand); > title('Blue Band', 'FontSize', fontSize); > message = sprintf('These are the individual color bands.\nNow we will > compute the image histograms'); > uiwait(msgbox(message)); > > fontSize = 13; > > % Compute and plot the red histogram. > hR = subplot(3, 4, 6); > [countsR, grayLevelsR] = imhist(redBand); > maxGLValueR = find(countsR > 0, 1, 'last'); > maxCountR = max(countsR); > bar(countsR, 'r'); > grid on; > xlabel('Gray Levels'); > ylabel('Pixel Count'); > title('Histogram of Red Band', 'FontSize', fontSize); > > % Compute and plot the green histogram. > hG = subplot(3, 4, 7); > [countsG, grayLevelsG] = imhist(greenBand); > maxGLValueG = find(countsG > 0, 1, 'last'); > maxCountG = max(countsG); > bar(countsG, 'g'); > grid on; > xlabel('Gray Levels'); > ylabel('Pixel Count'); > title('Histogram of Green Band', 'FontSize', fontSize); > > % Compute and plot the blue histogram. > hB = subplot(3, 4, 8); > [countsB, grayLevelsB] = imhist(blueBand); > maxGLValueB = find(countsB > 0, 1, 'last'); > maxCountB = max(countsB); > bar(countsB, 'b'); > grid on; > xlabel('Gray Levels'); > ylabel('Pixel Count'); > title('Histogram of Blue Band', 'FontSize', fontSize); > > % Set all axes to be the same width and height. > % This makes it easier to compare them. > maxGL = max([maxGLValueR, maxGLValueG, maxGLValueB]); > if eightBit > maxGL = 255; > end > maxCount = max([maxCountR, maxCountG, maxCountB]); > axis([hR hG hB], [0 maxGL 0 maxCount]); > > % Plot all 3 histograms in one plot. > subplot(3, 4, 5); > plot(grayLevelsR, countsR, 'r', 'LineWidth', 2); > grid on; > xlabel('Gray Levels'); > ylabel('Pixel Count'); > hold on; > plot(grayLevelsG, countsG, 'g', 'LineWidth', 2); > plot(grayLevelsB, countsB, 'b', 'LineWidth', 2); > title('Histogram of All Bands', 'FontSize', fontSize); > maxGrayLevel = max([maxGLValueR, maxGLValueG, maxGLValueB]); > % Trim x-axis to just the max gray level on the bright end. > if eightBit > xlim([0 255]); > else > xlim([0 maxGrayLevel]); > end > > % Now select thresholds for the 3 color bands. > message = sprintf('Now we will select some color threshold ranges\nand > display them over the histograms.'); > uiwait(msgbox(message)); > > % Assign the low and high thresholds for each color band. > % Use values that I know work. > redThresholdLow = 0; > redThresholdHigh = 196; > greenThresholdLow = 0; > greenThresholdHigh = 155; > blueThresholdLow = 0; > blueThresholdHigh = 10; > > % Show the thresholds as vertical red bars on the histograms. > PlaceThresholdBars(6, redThresholdLow, redThresholdHigh); > PlaceThresholdBars(7, greenThresholdLow, greenThresholdHigh); > PlaceThresholdBars(8, blueThresholdLow, blueThresholdHigh); > > message = sprintf('Now we will apply each color band threshold range > to the color band.'); > uiwait(msgbox(message)); > > % Now apply each color band's particular thresholds to the color band > redMask = (redBand >= redThresholdLow) & (redBand <= > redThresholdHigh); > greenMask = (greenBand >= greenThresholdLow) & (greenBand <= > greenThresholdHigh); > > % Display the thresholded binary images. > fontSize = 16; > subplot(3, 4, 10); > imshow(redMask, []); > title('Is-Red Mask', 'FontSize', fontSize); > subplot(3, 4, 11); > imshow(greenMask, []); > title('Is-Not-Green Mask', 'FontSize', fontSize); > subplot(3, 4, 12); > % Combine the masks to find where all 3 are "true." > % Then we will have the mask of only the red parts of the image. > cellMask = uint8(redMask & greenMask); > subplot(3, 4, 9); > imshow(cellMask, []); > caption = sprintf('Mask of Only\nThe Bluish Objects'); > title(caption, 'FontSize', fontSize); > > % Tell user that we're going to filter out small objects. > smallestAcceptableArea = 100; % Keep areas only if they're bigger than > this. > message = sprintf('Note the small regions in the image in the lower > left.\nNext we will eliminate regions smaller than %d pixels.', > smallestAcceptableArea); > uiwait(msgbox(message)); > > % Open up a new figure, since the existing one is full. > figure; > % Maximize the figure. > set(gcf, 'Position', get(0, 'ScreenSize')); > > % Get rid of small objects. Note: bwareaopen returns a logical. > cellMask = uint8(bwareaopen(cellMask, smallestAcceptableArea)); > subplot(3, 3, 1); > imshow(cellMask, []); > fontSize = 13; > caption = sprintf('bwareaopen() removed objects\nsmaller than %d > pixels', smallestAcceptableArea); > title(caption, 'FontSize', fontSize); > > % Smooth the border using a morphological closing operation, > imclose(). > structuringElement = strel('disk', 4); > cellMask = imclose(cellMask, structuringElement); > subplot(3, 3, 2); > imshow(cellMask, []); > fontSize = 16; > title('Border smoothed', 'FontSize', fontSize); > > % Fill in any holes in the regions, since they are most likely red > also. > cellMask = uint8(imfill(cellMask, 'holes')); > subplot(3, 3, 3); > imshow(cellMask, []); > title('Regions Filled', 'FontSize', fontSize); > > message = sprintf('This is the filled, size-filtered mask.\nNow we > will apply this mask to the original image'); > uiwait(msgbox(message)); > > % You can only multiply integers if they are of the same type. > % (cellMask is a logical array.) > % We need to convert the type of cellMask to the same data type as > redBand. > strDataType = class(redBand); > cellMask = eval([strDataType '(cellMask)']); > > % Use the red object mask to mask out the red-only portions of the rgb > image. > maskedImageR = cellMask .* redBand; > maskedImageG = cellMask .* greenBand; > maskedImageB = cellMask .* blueBand; > % Show the masked off red image. > subplot(3, 3, 4); > imshow(maskedImageR); > title('Masked Red Image', 'FontSize', fontSize); > % Show the masked off green image. > subplot(3, 3, 5); > imshow(maskedImageG); > title('Masked Green Image', 'FontSize', fontSize); > % Show the masked off blue image. > subplot(3, 3, 6); > imshow(maskedImageB); > title('Masked Blue Image', 'FontSize', fontSize); > % Concatenate the masked color bands to form the rgb image. > maskedRGBImage = cat(3, maskedImageR, maskedImageG, maskedImageB); > % Show the masked off, original image. > subplot(3, 3, 8); > imshow(maskedRGBImage); > fontSize = 13; > caption = sprintf('Masked Original Image\nShowing Only the Red > Objects'); > title(caption, 'FontSize', fontSize); > % Show the original image next to it. > subplot(3, 3, 7); > imshow(rgbImage); > title('The Original Image (Again)', 'FontSize', fontSize); > > message = sprintf('Done!\n\nThe demo has finished.'); > uiwait(msgbox(message)); > % ---------- End of main function --------------------------------- > > > %---------------------------------------------------------------------------- > % Function to show the low and high threshold bars on the histogram > plots. > function PlaceThresholdBars(plotNumber, lowThresh, highThresh) > % Show the thresholds as vertical red bars on the histograms. > subplot(3, 4, plotNumber); > hold on; > maxYValue = ylim; > maxXValue = xlim; > hStemLines = stem([lowThresh highThresh], [maxYValue(2) > maxYValue(2)], 'r'); > children = get(hStemLines, 'children'); > set(children(2),'visible', 'off'); > % Place a text label on the bar chart showing the threshold. > annotationTextL = sprintf('%d', lowThresh); > annotationTextH = sprintf('%d', highThresh); > % For text(), the x and y need to be of the data class "double" so > let's cast both to double. > text(double(lowThresh + 5), double(0.85 * maxYValue(2)), > annotationTextL, 'FontSize', 10, 'Color', [0 .5 0]); > text(double(highThresh + 5), double(0.85 * maxYValue(2)), > annotationTextH, 'FontSize', 10, 'Color', [0 .5 0]); > > % Show the range as arrows. > % Can't get it to work, with either gca or gcf. > % annotation(gca, 'arrow', [lowThresh/maxXValue(2) highThresh/ > maxXValue(2)],[0.7 0.7]); > > return; % from PlaceThresholdBars > > >
From: ImageAnalyst on 18 Apr 2010 15:03 It looks like you chose some alternate way to color classify your image, rather than mine, which is fine - my demo is not super robust anyway, it's just a simple demo for beginners. You're using kmeans which is in the stats toolbox which I don't even own. Even if you remembered to post your kmeans code, I can't run it, so good luck with it.
From: subrajeet Mohapatra on 19 Apr 2010 00:43
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <9ab6d548-12c1-4195-b115-ae8b9002b4a9(a)k41g2000yqf.googlegroups.com>... > It looks like you chose some alternate way to color classify your > image, rather than mine, which is fine - my demo is not super robust > anyway, it's just a simple demo for beginners. You're using kmeans > which is in the stats toolbox which I don't even own. Even if you > remembered to post your kmeans code, I can't run it, so good luck with > it. Thanks for replying is it possible to get the rbc instead of blue nucleus by changing the program by any way. please reply |