How to get pixel values from a selected image window

2 Ansichten (letzte 30 Tage)
Tania
Tania am 26 Nov. 2014
Bearbeitet: Tania am 26 Nov. 2014
Hi everyone,
I am trying to get all the pixel values from a rectangle region

Akzeptierte Antwort

Image Analyst
Image Analyst am 26 Nov. 2014
First of all, x is column, and y is row - not vice versa like you have it. So to get a 5-by-5block of pixels, a subimage, around an x,y location, you can use indexing:
subImage5x5 = fullImage(y-2:y+2, x-2:x+2);

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