Re: Find pixmap in pixmap
What do you mean by "Pixmap within a pixmap"?
How did you achieve that nested pixmap?
Re: Find pixmap in pixmap
It is well friend, I have a pixmap1 with the image of a window, and I have another pixmap2 with the image of the work area complete with a window contained in it, so I want and that is found pixmap1 in pixmap2 and I get the position x , where y is found.
Thanks for helping me!
Re: Find pixmap in pixmap
I cannot see any trivial out-of-the-box way to do this, even for images that are perfectly lossless (forget it if you have lossy images like JPEGs). Pure brute force. You have to scan the containing image pixel-by-pixel for pixels matching the top-left pixel of the contained image. Once you have found a possible matching location you have to check the other pixels of the containing and contained images. As soon as a pixel no longer matches you can skip to the next possible top-left match.
If these images are screen shots then the title bars and window borders, which are consistent, will cause the simple approach above to be inefficient because of many false positive matches. You may be better off checking pixels inside the images away from the borders.
You might be able to improve efficiency with an image analogue to the Boyer-Moore string search algorithm.
If the contained image is not arbitrary, e.g. a yellow circle, then this might be of interest. OpenCV may be of use.
Re: Find pixmap in pixmap
As ChrisW67 mentioned, this issue is data analysis and/or pattern matching, it is not a Qt issue - libs dealing with such stuff as OpenCV are what you are looking for.