Azzera filtri
Azzera filtri

how to do windowing in image using matlab?

15 visualizzazioni (ultimi 30 giorni)
Sheema Khattak
Sheema Khattak il 3 Lug 2014
Commentato: Image Analyst il 7 Lug 2014
how to do windowing in image using matlab?
  2 Commenti
SRI
SRI il 3 Lug 2014
Hi shah Could you please clear with your question so that we can assist you with the solution
Sheema Khattak
Sheema Khattak il 4 Lug 2014
Hello!
I am talking about the window filter in image which works portion by portion in an image.Divide the pixels of an image into frames or blocks to work on it and these blocks are made on the basis of similarity of pixels and its neighbors.thank you

Accedi per commentare.

Risposte (2)

Image Analyst
Image Analyst il 4 Lug 2014
Try conv2(), imfilter(), or nlfilter(), or blockproc() depending on exactly what you want to do. conv2() and imfilter() are for linear filters. nlfilter is for any bizarre custom function you want write and apply to each window. blockproc() is if you want to process windows in "jumps" where it moves from one location to the next by more than 1 pixel.
  5 Commenti
Sheema Khattak
Sheema Khattak il 7 Lug 2014
Would conv2() and imfilter() work on the basis of similarity of pixels and group the similar ones to form a clump of object or not?
Image Analyst
Image Analyst il 7 Lug 2014
No. To do that you need to do connected components labeling. But even before that you need to do image segmentation to find the "objects". See my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

Accedi per commentare.


SRI
SRI il 7 Lug 2014
clc;
close all;
input = imread('cameraman.tif');
[row,col] = size(input);
% minValue = mean(mean(input));
for i = 2:row-1
for j =2:col-1
outImage(i-1:i+1,j-1:j+1) = input(i-1:i+1,j-1:j+1)
% if outImage(i-1:i+1,j-1:j+1) < minValue % outImage(i-1:i+1,j-1:j+1) = 1;
% end
end
end
Hi shah you just apply any filter operation with this code because this will divide a image into 3 *3 matrix after that you can process as you wish

Community Treasure Hunt

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

Start Hunting!

Translated by