Filter löschen
Filter löschen

Pixel extraction and Reclassify

4 Ansichten (letzte 30 Tage)
dian_pratama
dian_pratama am 12 Mär. 2015
Kommentiert: Image Analyst am 17 Mär. 2015
I had segmented image and want to detect of these pixels by extracting all pixels that do not have the same label in their 3×3 neighborhood (N_ns), and then re-classify of these extracted pixels using local information in a 5×5 neighborhood (N_rl). What can I do? Thanks..

Akzeptierte Antwort

Image Analyst
Image Analyst am 12 Mär. 2015
labelsYouWantToKeep = [3,5,9]; % Whatever blob numbers you want.
% Get a new labeled image with only those blobs in it.
newLabeledImage = ismember(originalLabeledImage, labelsYouWantToKeep);
imshow(newLabeledImage, []); % Display it.
% Remeasure with only those blobs in the image.
newMeasurements = regionprops(newLabeledImage);
  4 Kommentare
dian_pratama
dian_pratama am 17 Mär. 2015
How about N_ns and N_rl? Can I apply that in matlab? I think before, #3 is 3x3 neighborhood, #5 is 5x5 neighborhood, and #9 is image size. LOL..
Image Analyst
Image Analyst am 17 Mär. 2015
Explain more of what you want to do, especially about what you want to do with blobs based on what is in their "neighborhood". Say blob #15 and blob #27 have their centroids or perimeters within 9 pixels of each other - now what????

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by