Answer the question
In order to leave comments, you need to log in
How to work with an image in OpenCl?
Ku! I have a question, how can I work with an image multithreaded using OpenCl? To optimize the project, we decided to transfer the calculations to gpu. I have an img.png file in my directory, for example: /home/program/, how can I get the color of the pixels using OpenCl in (r,g,b) and multi-thread add all the blue values? I will be glad if you help with a link to examples, preferably Russian-speaking, or code.
Answer the question
In order to leave comments, you need to log in
MatLab has matrix addition (without video processor). But it is also possible on a video processor using CUDA.
This example of reading png is a bad one.
The matter is that png decoding is not parallelized. It will be executed on 1 processor core. And it will take 80% of the time. I think so. And the already decorated RGB matrix - yes, you can process it on Opencl by breaking the picture into lines or frames. But the benefits of opencl will be lost. After all, we have already stood for the lion's share of the time waiting for decoding.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question