开发者

image processing [closed]

开发者_Python百科 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

How is image processing done?

I want to compare two images and identify the differences between them. How do I identify difference between two taken pixels of different images?


The particulars depend on which language you are using, but generally it works something like this:

Each image is treated programmatically as a two dimensional array. So to find the difference in values at the same pixel (call it x,y) for two different images you would do something like this:

diff = image1[x][y] - image2[x][y]

There are some implementations details you have to wary of (e.g. the difference will be signed), but this is the basic idea.

If you mention what language you're working with, I can offer some advice about how to open an image so that it can be treated like an array.


Don't simply add the differences from Answer 1, or positive and negative differences will cancel out! You need to sum the squares of the differences, or their absolute values. You could also consider multiplying the pairs of pixels and dividing by their sum (correlation).

All three of these methods are now technically correct but they will still be far from practically useful. Don't be surprised to find smaller difference between two totally unrelated images than, say, two images of the same object with a slightly different illumination.


"How is image processing done?"
Ans: Depends on what processing you want to do. There are hundreds of operations you could do in image processing, each one may have an entirely different approach, the only thing in common being reading and storing the pixel data.

"I want to compare two images and identify the differences between them. How do I identify difference between two taken pixels of different images?"

Before even asking you about the type of images - I would like to ask what you mean by "identify difference between two taken pixels"? Do you just want to know if the two images are different? Do you want to know which pixels are different? Do you want to know if pixels at a given location are different?


try processing.js you can do some really fun stuff with that.

http://processingjs.org/


Random selecting pixels and check the size of the image. if they are the same, you could possible assume they are identical.


Here's an image processing example that I did a couple weeks ago.

http://keshavsaharia.com/2011/03/17/theres-waldo-2/

It's built in Mathematica, and takes a Where's Waldo puzzle and uses fairly simple image processing techniques to find Waldo.

Image processing is a pretty simple concept. It is almost entirely based around taking individual pixels and applying transformations to the image as a whole based on numeric properties of the pixel values in relation to other pixel values or to a given threshold value.

Mathematica is a fantastic tool for image processing, as is Matlab and Python (if you're looking for a python solution, check out PIL). Image processing libraries are available for pretty much every programming language - C++ has EasyBMP, Java has a wide variety of image tools, and every language has its own set of unique methodologies. Choose the language based on your application.


If you need just a simple comparison of two images on the pixel basis, there is nothing as simple as count sum of differences between each pixels of two images. This approach is not very versatile and for example different illumination can significantly affect results.

What is to say, image comparison is still open research problem and it is related to the image-mining task.

If you need some more advanced image comparison, you can try Rapidminer with IMMI extension which includes several advanced methods for image comparison.


Image processing is a massive field so I don't think any single answer on here will teach you everything there is to know about image processing. There are many great sources and lectures scattered all over the internet that you can learn tons of information from. If you want a good book for signal processing (signal is representative of almost any datatype: light, sound, image, etc, etc...) which covers a huge number of signal processing techniques check out Signals and Systems.

But otherwise if you just want to learn basic processes that can be applied to images check out the processing language (like jaboston said) and its tutorials/learning books as its essentially designed for visual artists and makes image processing a much less laborious (syntactically) task than other languages: http://processing.org/ .

And erich has the right of it- use the euclidean distance to work out the difference between two pixels.


Image similarity is not an easy task and is still open research problem. Pixel per pixel comparison usually does not give good results and at the same time it is quite time consuming.

One of the approach is to use Rapidminer (open-source tool). Radpiminer (widely used data mining platform, http://rapid-i.com) with IMMI plugin (IMage MIning extension, http://splab.cz/immi) implements similar methods and can do some non-trivial similarity measurements.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜