フィルターのクリア

how to get the image after using impixel() ?

1 回表示 (過去 30 日間)
Manoj Kumar
Manoj Kumar 2014 年 12 月 24 日
コメント済み: Manoj Kumar 2015 年 1 月 26 日
hi,
I used impixel() to select the particular pixels in an image.
pixelValues = impixel();
My problem is in displaying the selected pixels in the form of a image.
Can any one help me.
Thanks...

採用された回答

Image Analyst
Image Analyst 2014 年 12 月 24 日
They already are in the image. You can't even use impixel() if you don't already have an image.
  7 件のコメント
Image Analyst
Image Analyst 2015 年 1 月 26 日
If you're using ginput() to have the user click on a blob, then you'll have to get the distances of that point to the centroids of all other blobs. This will work as long as the blobs are about the same diameter, but not, for example, if you click on the outer edge of a huge blob that is closer to the center of a nearby small blob than it is to the center of the huge blob. Another way is to use that point to create a binary image with just the pixel set where the user clicked on. Then use imreconstruct() to extract just the blob they clicked in. However if they actually missed and clicked in the black space, it won't get anything. If you want the nearest blob even if they didn't click inside one, then you'll have to call regionprops and get the PixelIdxList of all the pixels in all blobs and then see which labeled pixel is closest.
It really depends on how you define closest and what you want to do if the user "misses" and clicks outside a blob.
Manoj Kumar
Manoj Kumar 2015 年 1 月 26 日
thanks,
I have a small doubt like, when we click on two blobs, then how to find the distance between two blobs over here.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by