Fill the region of rotating bounding box with nearest pixel value

2 views (last 30 days)
I have a rotating bounding box in an image. I want to fill region inside the bounding box with nearest pixel values outside the bounding box. I am thinking of going through the regions of the bounding box iteratively and calculating the left and right neighbour value for each row and fill that row with those values. Before doing that i want to know is there an elegant and better way of doing that in Matlab or opencv (python) by using some functions

Answers (1)

Naman Chaturvedi
Naman Chaturvedi on 24 Aug 2018
Hi Prashant
You can design the appropriate mask and then use the functions:- conv2 / filter2 / imfilter to apply the mask to your image and get the desired results.
Hope this helps.

Community Treasure Hunt

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

Start Hunting!