How to compute gray-level difference of an image....
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File 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!