How to compute gray-level difference of an image....
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Elysi Cochin
am 1 Jul. 2014
Bearbeitet: Image Analyst
am 1 Jul. 2014
Please can someone help me to compute the "gray-level difference" of image...
i need to get an answer like [2 -2 -1 1 -2 -4 -3 3]
somewhat of this range digits of "0 - 7" range....
i tried many codes available in the net... but from none of them i got such an output in the range "0 - 7' for an image patch...
My images are of size 32 X 32 and of patch size 8.... please do someone reply me.....
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 1 Jul. 2014
Bearbeitet: Image Analyst
am 1 Jul. 2014
Use the rangefilt() function.
J = rangefilt(I) returns the array J, where each output pixel contains the range value (maximum value − minimum value) of the 3-by-3 neighborhood around the corresponding pixel in the input image I. The image I can have any dimension. The output image J is the same size as the input image I.
J = rangefilt(I, NHOOD) performs range filtering of the input image I where you specify the neighborhood in NHOOD. NHOOD is a multidimensional array of zeros and ones where the nonzero elements specify the neighborhood for the range filtering operation. NHOOD's size must be odd in each dimension.
By default, rangefilt uses the neighborhood true(3). rangefilt determines the center element of the neighborhood by floor((size(NHOOD) + 1)/2). For information about specifying neighborhoods, see Notes.
Use imerode() to get the min value in a window, and imdilate() to get the max value in a window.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 3-D Volumetric Image Processing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!