Work with operations pixel by pixel and loops
Hello All.
I heard in this forum before that it isnt recomended work or make an operation pixel by pixel and its more convenient use a function defined in opencv headers and librarys. But that opencv's functions have to work pixel by pixel or there is another way?
For example in this post.
http://answers.opencv.org/question/18...
I needed to copy a half image and first I did it with a for().
Why is not recomended use a loop?
Thanks in advance. its a theorical question.
copy half an image :use a rect :
results :
Many functions are optimized with a parallel loop or opencl but not all functions. Sometimes pixel loop are faster than opencv function. If you find this case write a post then somebody will make a Pull request to improve function or better do PR yourself you are welcome
Thanks for the reply. I will check the opencv function but for some proccess I like to use my own loops. Its more easy and faster for me than go to documentation and check the function parameters and Id like to perform pthreads by myselft. Thanks a lot.