I'm trying to do top hat filtering in MATLAB. The imtophat
function looks promising, but I have no idea how to use it. I don't have a lot of work with MATLAB before. I am trying to look find basically small spots several pixels wide that are local maxima in my 2 dimensional array.
相关问题
- How to get the background from multiple images by
- Extract matrix elements using a vector of column i
- Try to load image with Highgui.imread (OpenCV + An
- CV2 Image Error: error: (-215:Assertion failed) !s
- How do I apply a perspective transform with more t
相关文章
- How do I append metadata to an image in Matlab?
- How can I write-protect the Matlab language?
- `std::sin` is wrong in the last bit
- Python open jp2 medical images - Scipy, glymur
- Escape sequence to display apostrophe in MATLAB
- On a 64 bit machine, can I safely operate on indiv
- Converting PIL Image to GTK Pixbuf
- Vertical line fit using polyfit
The documentation on
imtophat
has an example .. did you try it? The following images are from the MATLAB documentation.Code
Original
(image source: mathworks.com)
Top Hat with a disk structuring element
(image source: mathworks.com)
tophat is basically an "opening" procedure followed by a subtraction of the result from the original image. the best and most helpful explanation of opening I've found here:
http://homepages.inf.ed.ac.uk/rbf/HIPR2/morops.htm
I think you have more problem undertanding how to use STREL, than IMTOPHAT. The later can be described as simple threshold but per structural element, not the whole image.
Here is another good examples of using STREL and IMTOPHAT: http://www.mathworks.com/matlabcentral/fx_files/2573/1/content/html/R14_MicroarrayImage_CaseStudy.html
This series of posts on Steve Eddins blog might be useful for you: http://blogs.mathworks.com/steve/category/dilation-algorithms/