Feature Detection Functioning Explanation

asked 2019-04-24 15:03:06 -0500

LiorA gravatar image

updated 2019-04-24 15:47:39 -0500

I'm a bit confuse.

I can detected a book, from a picture of 4 books. But can't detect a sign, from a picture of 3 books.

Very Similar Conditions, OpenCV - wise.

If I normalize / equalize histograms, it will help ? (I will guess a bit..)

What is the reasons to the following results ?

Pictures -

Books : https://ibb.co/KrXtPw0 Signs : https://imgur.com/a/QLQ9MLA

Any suggestions can help.. Thank's,

edit retag flag offensive close merge delete

Comments

But can't detect a sign

it wasn't made to detect things. if that's what you wanted, you're on the wrong boat with this.

berak gravatar imageberak ( 2019-04-24 16:03:06 -0500 )edit

Yeah, you told me so, but I have to see it by myself. I also started to learn in the meantime ImgProc module. I understand that 'template matching' is also not the way to go as it for "finding areas of an image that match (are similar) to a template image (patch).".

the 'What next' section -

If I will characterize the signs (if possible), by its vertical middle appearance (like here: https://imgur.com/a/D7YdEYr ).

And with the assumption that each sign has its own 'vertical middle signature'. Can I get good match results, if I detect the sign I want to find, and take only his 'vertical middle signature' using a mask operation.

In such case, img_hash can be my way to go ? Or histograms comparison ?

Thank you on your patience..

LiorA gravatar imageLiorA ( 2019-04-25 07:08:03 -0500 )edit

hmm, unless you're absolutely clear about what you are trying to ACHIEVE, it will always be an ill-fated XY-problem

berak gravatar imageberak ( 2019-04-28 03:05:28 -0500 )edit

Its going to be long, can skip on the unwanted sections : ( My Second comment will be on Point) Introduction Section: I'm a junior dev. One month ago I opened my first question. At the time I wasn't familiar with opencv, Android, Java, computer vision etc. Since I did some basic app's in Android. learned about openCV (Img_Proc and Feature Detection - the most.) The problem in DEFINE the problem you trying to solve, is not knowing what openCV can do.

Crying Section: The fact I don't know Python, or remember C++ , didn't help. Also, Java and android opencv examples is minority compared, to c++ and Python. Another problem, is the amount of tutorials of different versions. I first start with 2.4.* , understand what is going on, and then advanced to 3.4.5

LiorA gravatar imageLiorA ( 2019-04-28 09:00:47 -0500 )edit

Definition Section:

To my limited understanding:

Identify a Sign from a list of very - Similar signs, In various angles. Get the Best results you can achieve.

The assumption is that nothing will cover part of the sign,

How to Solve Section -

I think for now to :

  1. Isolate the sign using HoughLine and warpPerspective(4 points)
  2. Find the most similar Image(sign), from a set of isolated images of the signs, using PHash / Histogram Comparison, or both.

I getting my best results by now using P-Hash site. (or it seems to be).

I'm using HoughLine, because the image can be details crowded. findcontour gave me 10K contour's, and fail to detect the sign.

LiorA gravatar imageLiorA ( 2019-04-28 09:09:45 -0500 )edit