필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Elysi Cochin
Elysi Cochin 2014년 7월 1일
편집: Image Analyst 2014년 7월 1일
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.....

채택된 답변

Image Analyst
Image Analyst 2014년 7월 1일
편집: Image Analyst 2014년 7월 1일
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개)

카테고리

Help CenterFile Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by