How to select irregular area in a pic.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nisar Bahoo
el 8 de Jun. de 2019
Respondida: Vishnu Vardhan
el 8 de Jun. de 2019
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 comentarios
Respuesta aceptada
Vishnu Vardhan
el 8 de Jun. de 2019
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 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!