c++ - Adaptive Bilateral Filter to preserve edges -


I need to be able to find the edge of a card, currently it works when the background is non-disruptive And the best it is the opposite but still works very well on the non-reverse background.

The problem occurs when the card is on the disruptive background, the bilateral filter gives too much noise and causes the wrong edge to be detected.

Here is the code I am using:

  Bi-filter (imgGray, detectedADez, 0, 175, 3, 0); Seni (Detected Ages, Detected Ages, 20, 65, 3); Spread (detected aged, detected, matte :: cheese (3,3, CV_8UC1));  

The gridlash version of the original image will be imgGray .

Here are some tests on disruptive backgrounds and results (contact information), perverted in all images):

Color card:

Results:

And here's a white card:

Results:

Does anyone Uje I can tell how the edges of the card I can protect any no matter the background color while removing the noise?

Search for edges using canny , which you are already doing Find the contour in the image and find the appropriate rectangle find bounding box and apply some thresholds and rectangle dimensions to occupancy. This can be zero under your rectangle i.e. should be the edges of your card and it should be taken as ROI on which you can work forward.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -