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
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
lbllargura.Caption := FloatToStr(Bmp.width);
lblaltura.Caption := FloatToStr(Bmp.Height);
largura := Bmp.width ;
altura := Bmp.Height ;
descarta := 0;
tot := largura * altura;
ProgressBar1.Max := tot;
limite := strtoint(txtlime.text);
for i :=0 to BMP.height - 1 do
for j := 0 to bmp.width -1 do
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
descarta := descarta + 1;
preto := preto + 1;
cont := cont + 1;
ProgressBar1.Position := cont;
“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!