Using a HBITMAP image with template matching
Is there a way to save a screenshot in a HBITMAP, (either partial or full) and use it in template matching? If so, what would be the best way to approach doing so. I think imdecode() would work but I could not decipher how to go about using it.
The point of this exercise is to avoid saving the file to disk. I was able to do this already and my program ran but there will be a large number of screenshots taken and I would prefer to not have the hard drive working constantly.
If there is a better way than HBITMAP to enter images from screen into a template match function I would love to learn about it.
Note: I am working in c++ with visual studio 2013. The matching is working great currently but I have not found a dependable way to get screen images into opencv without saving first.
Edit to be clear I am trying to avoid saving the image.
http://answers.opencv.org/question/67...
I found this before I posted and unfortunately it is not applicable to my issue. I don't have trouble getting the image. I am having trouble understanding how to use it without saving it to disk first. The solutions on that link are mostly about saving the image.