Message Boards Message Boards

1
|
3755 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

Remove jaggies from image's boundary

Posted 9 years ago

I need to remove some jaggies from the boundary of an image. This image is taken from the depth frame of the Kinnect Camera.

This is the original image, which contains many jaggies on the boandary due to noise:enter image description here

This is the result that i want:enter image description here

Can someone help me with an algorithm or some related materials to achieve this ? It's pretty urgent for me cause it's my graduation thesis. Thank u so much !

POSTED BY: Nam Vu

Hi,

a combination of Blur and Binarize should do the trick. I do not have access to the original image, i.e. the mask, so there is a bit of preprocessing to extract your black region.

If your image is saved in a variable img, then this works:

Binarize[Blur[MorphologicalTransform[DeleteSmallComponents[Binarize[img, 0], 950], "Commonest", 15], 30], 0.5]

enter image description here

you can do more sophisticated combinations, and play with the parameters. Here's one:

Binarize[Blur[
  Closing[KuwaharaFilter[
    MorphologicalTransform[
     MorphologicalTransform[
      DeleteSmallComponents[Binarize[img, 0], 950], "Commonest", 15], 
     "BoundaryStraighten", 24], 22], DiskMatrix[18]], 15], 0.5]

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract