How do I segment an image into 3x3 blocks or 9x9 blocks for further image processing?

2 vues (au cours des 30 derniers jours)
I have a GUI, after you segment an image into 3x3 blocks, user can choose which blocks for further image processing. Is that possible to display number in every block? So that user is able to choose which block for further image processing.

Réponse acceptée

Image Analyst
Image Analyst le 8 Août 2016
Use ginput(1) to let the user select the part of the image to process. After that you can easily get the row and column to process.
[x, y] = ginput(1); % User picks place
row1 = round(y);
row2 = row1 + 2;
col1 = round(x);
col2 = col1 + 2;
subImage = grayImage(row1:row2, col1:col2);
  2 commentaires
KHOR  WEI KOK
KHOR WEI KOK le 8 Août 2016
what is the meaning of grayImage?
Image Analyst
Image Analyst le 8 Août 2016
That's the name of your image variable. What did you call your image? Hopefully not something bad like "image" or "I" or something. But it has to have a name, so just replace grayImage with the name of the variable you are using to hold your image.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Computer Vision with Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by