How to select irregular area in a pic.
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello! I am working on a project in which i have to select a circular or irregular area and blur the background or the outer area of the selected area. as i have applied smoothing filter to blur the pic but i am having difficulty in selecting area. Can anyone please help me in selecting the shape and aplying the filter only on the outer side of selected shape. And also how can i take selection input from user.
댓글 수: 0
채택된 답변
Vishnu Vardhan
2019년 6월 8일
To find the area you may need to segment your image. If you just want to define the area's vertices somehow, like with roipoly() or imfreehand(), then you can get the area with polyarea(). However if the area is defined by something like intensity, texture, or whatever, then you need to segment the image. Segmentation means undergoing a series of steps such as filtering or morphology or something until you eventually get to an image that can be thresholded to form a binary image (your segmented image). With that binary image you can then label it with bwlabel() or bwconncomp() and then call regionprops(). Or you can call bwarea() for a different definition of area, weighted by how the boundary winds around, whereas regionprops() gives area as a simple count of pixels in the blobs.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!