Lately I've been experimenting with some image analysis algorithms, in the context of scraping the Web for images or circuit schematics which are "similar" to a candidate file. I wrote a script in Python and it's kind of fun to play around with! It's a bit hit or miss (computer vision is obviously a very non-trivial field) but it can sometimes return inspired results.
Given the URL
formatting link
and the search string "power amp schematic" it goes off to search Google Images and returns as the top 5:
I need a circuit that will recognize a yellow sign by the side of the road that says "SPEED RADAR" ;-) ...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
I wonder what kind of algorithms they use - bet they won't tell you! I'll share how my script does it, though. It first takes the source and test images, resizes them to be the same size, converts them to greyscale, and runs them through an edge enhance filter. It then cuts the resulting images up to NxN blocks, converts the array of greyscale values into a square matrix, and computes the eigenvalues of each of these matrices.
A weighted sum of the magnitudes of the eigenvalues is computed for each block. The magnitudes of the eigenvalues of the matrix generated directly from the image greyscale values encode information about the image; the large magnitude eigenvalues are the DC component, while the small values are noise. The weighted sum of the middle values encode information about the "texture" or "smoothness" of that section of the image; lower values indicate higher smoothness.
Finally, a multidimensional k-nearest neighbors search is done to find the images whose array of eigenvalues correspond best to the test image.
Of course Tin Eye has to write their own search engine and crawler to implement their algorithms, for this little script I can just rip off Google Images... :)
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.