Effacer les filtres
Effacer les filtres

How to compute gray-level difference of an image....

2 vues (au cours des 30 derniers jours)
Elysi Cochin
Elysi Cochin le 1 Juil 2014
Modifié(e) : Image Analyst le 1 Juil 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.....

Réponse acceptée

Image Analyst
Image Analyst le 1 Juil 2014
Modifié(e) : Image Analyst le 1 Juil 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.

Plus de réponses (0)

Catégories

En savoir plus sur 3-D Volumetric Image Processing 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