LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare camera image with image archive and find replica

Solved!
Go to solution

Hello, 

 

I have a big database with unique images of old hard disc drives. I would like to compare this database with a picture of a hard drive that I made with my camera and find the identical image in the database. Can anyone direct me to a similar example project so I have an idea how to start this project. 

 

Thanks in advance,

 

0 Kudos
Message 1 of 9
(3,656 Views)

Not sure what you're asking for. Since there are tools (Google) to do that, why would you make it in LabVIEW?

 

Are these images exactly the same? As in binary the same? Or do you want to do some sort of image recognition to see if the photo's have more or less the same content? That would be difficult.

0 Kudos
Message 2 of 9
(3,640 Views)

Hello thanks for replying, 

 

We have a database of unique images of Hard disc drives (I have put an example in the attachments).  We would like to archive new incoming hard drives based on the geometry so we need to compare the new image with our existing archive and find a match. 

 

We have Labview, vision assistent and vision builder available so we thought it would be easier to make use of this software instead of creating our own interface with OpenCV in python or something else.

0 Kudos
Message 3 of 9
(3,629 Views)
Solution
Accepted by topic author IfoundWally

Ah. That explains a few things.

 

I think the only way to do something like you describe is like this:

 

1) Loop over each stored image

2) get some unique characteristics, like a fingerprint of the image

3) store the characteristics in a database, linking the images to the characteristics

4) When a new image arrives, get it's characteristics, and look them up in the database.

 

That might be an open door, but we better make sure we're on the same page.

 

Getting those characteristics is the tricky part. But that problem is completely separated from the rest of the problem. Of course you can use Vision\LabVIEW to do that. I'm not too fond of Vision assistant\builder myself, I prefer programming it directly in LabVIEW. That doesn't really matter though.

0 Kudos
Message 4 of 9
(3,617 Views)

Thank you, we will try to use this technique for our first tests. The end goal of the project is to be able to use our program for thousands of hard drives so it would be practically impossible to define features for every type of hard drive by hand. 

 

We were thinking of comparing  the similarity of the geometry with a threshold to determine whether the object is identical or not.

We were also thinking of using automatically defined features for example with SURF or SIFT (https://docs.opencv.org/3.3.0/da/df5/tutorial_py_sift_intro.html)  but it seems that there is not a way to implement this in labview (as this person pointed out: https://forums.ni.com/t5/kl3m3n-s-blog/SIFT-and-SURF-in-LabVIEW-with-OpenCV/ba-p/3484142). 

0 Kudos
Message 5 of 9
(3,610 Views)

SURF nor SIFT are build into Vision. Besides the patents (of SURF), there are no technical reasons why it can't be done in LabVIEW. But Vision will be of little use. In other words: you're on your own. I'd look (as you might have mentioned) into calling Python\OpenCV from LabVIEW.

 

Not sure what happened to your links:

https://docs.opencv.org/3.3.0/da/df5/tutorial_py_sift_intro.html

https://forums.ni.com/t5/kl3m3n-s-blog/SIFT-and-SURF-in-LabVIEW-with-OpenCV/ba-p/3484142

0 Kudos
Message 6 of 9
(3,603 Views)

Any chance there is information encoded in the barcodes that would be of use for matching? 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 9
(3,596 Views)

Sadly no. Not every hard drive has a barcode so we cannot use this infomation universally. Also barcodes are not always inherent to one specific design of a product

0 Kudos
Message 8 of 9
(3,593 Views)

What about the solder points on the PCB?  IF there is a unique pattern to each type of hard drive you wish to identify you could threshold the image and apply star pattern mapping algorithms used for constellation identification.

 

Compare your image to your set of templates and, if one is not found to a reasonable match %, prompt the user/operator whether they wish to create a new template or scrap the image (say for poor quality or damage on the part).  Instead of generating all conceivable templates at the beginning of your project, they are added as they are encountered.

0 Kudos
Message 9 of 9
(3,587 Views)