Rastrear pixels de imagens bmp com o CUDA The Cuda is advantageous?

Hello
Friends developers,
I wonder if it is advantageous to scan the pixels of an image using Cuda.
I scan using the Delphi method and to get large images is much
slow.
Thank you for your help

Delphi is slow by itself, it could be optimized on cpu or gpu.

Thanks for responding …
In this case what do you recommend for me CUDA or other C + + language, visual,
It’s worth using CUDA to scan the pixels of an image Jpeg

what do you want to do with picture?

I need to find out the amount of green, red and blue in each pixel, in my tests I noticed that in AMD, the scan is much faster than the intel, but still need more speed. 1280 x 720 image takes a minute and twenty seconds to be scanned.

Yuo can speed up it in 10000 times with different ways. Though I am sorry, I do not completely understand you. I suppose you already have pixels in rgb format.

Sorry for bad English, my project is to load a bmp image monochromatic, and sweep their pixels, so I can figure out how many white and black pixels in the image I own. I thought with CUDA would be faster

Friend, you believe that AMD processors for gaming or editing graphics are better than the intel?

can you please post your delphi code

Yes


Bmp.LoadFromFile(‘C:\x\x\imagem.bmp’);
//Bmp.LoadFromFile(‘C:\x\imagem.bmp’);

lbllargura.Caption := FloatToStr(Bmp.width);
lblaltura.Caption := FloatToStr(Bmp.Height);
largura := Bmp.width ;
altura := Bmp.Height ;
descarta := 0;
tot := largura * altura;
cont:=0;
ProgressBar1.Max := tot;
limite := strtoint(txtlime.text);
for i :=0 to BMP.height - 1 do
begin
for j := 0 to bmp.width -1 do
begin
R := GetRValue(BMP.Canvas.Pixels[j,i]);
// showmessage('vermelho…: '+ inttostr®);
G := GetGValue(BMP.Canvas.Pixels[j,i]);
// showmessage('verde…: '+ inttostr(G));
B := GetBValue(BMP.Canvas.Pixels[j,i]);
// showmessage('Azul…: '+ inttostr(B));

if (R > limite) and (G >limite) and (B > limite) then
begin
descarta := descarta + 1;
end
else
begin
preto := preto + 1;
end;

cont := cont + 1;
ProgressBar1.Position := cont;
end;
end;

“R := GetRValue(BMP.Canvas.Pixels[j,i]);”

you should get rid of it. You need to access raw pixel data as array of bytes and operates with it. You can do it with delphi to, ask in Delphi forum.

Okay, I’ll do that, and do some testing thanks for your help!