One the measurements provided by regionprops is 'Centroid'. Here's an example of labeling binary objects, computing the centroid of each object, and plotting the centroid location on top... 続きを読む >>
Note
Steve on Image Processing with MATLAB has been archived and will not be updated.
One the measurements provided by regionprops is 'Centroid'. Here's an example of labeling binary objects, computing the centroid of each object, and plotting the centroid location on top... 続きを読む >>
The functions bwlabel and regionprops are very useful for measuring the properties of shapes in a binary image. There are documentation examples and product demos showing how to do this,... 続きを読む >>
Didja know? You can fill holes, or pits, in grayscale images by using the Image Processing Toolbox function imfill. The other day I was rereading the Tarboton paper on upslope area,... 続きを読む >>
[NOTE: After I originally wrote this post about handling plateaus, I discovered problems with the method, so I am no longer using it. I revisited the plateau issue in a later post. -SE] ... 続きを読む >>
Last week I wrote about a possible modification to poly2mask that would estimate how much of each pixel is contained within a polygon. The idea was to use a regular 5-by-5 subgrid and ... 続きを読む >>
Several people have asked me recently how to plot some kind of shape on top of an image, so I thought I'd show the basic technique here. Essentially, you display the image, then call hold on,... 続きを読む >>
This is the final post in a series discussing the algorithm underlying Image Processing Toolbox functions poly2mask and roipoly. (See Part 1 and Part 2.) There are several desirable... 続きを読む >>
I'm familiar with two basic ways to determine whether a point is inside a polygon. The first is to compute the winding number, which is the number of times that a closed curve encircles the... 続きを読む >>
This is the first of several blogs about the algorithm behind poly2mask and roipoly. poly2mask takes a set of polygon vertices and produces a binary mask image. The binary mask has 1s for... 続きを読む >>
Reader JP asked me about my recent blog post on the Hough transform. Specifically, she wanted to know exactly how the rho-theta coordinate system was defined. When I answered her question, ... 続きを読む >>