計算影像的黑點數 |
尚未結案
|
terrence
一般會員 發表:1 回覆:1 積分:0 註冊:2006-11-01 發送簡訊給我 |
|
terrence
一般會員 發表:1 回覆:1 積分:0 註冊:2006-11-01 發送簡訊給我 |
|
天國神族
一般會員 發表:4 回覆:5 積分:1 註冊:2006-07-16 發送簡訊給我 |
|
n890377
一般會員 發表:17 回覆:16 積分:21 註冊:2006-07-13 發送簡訊給我 |
Graphics::TBitmap *TheBitmap, *TempBitmap;
TempBitmap = new Graphics::TBitmap(); TempBitmap =Image1->Picture->Bitmap; Byte *ptr_s; int g_s,j,i,line,g_s1,g_s2; int cxy=0,sx=0,sy=0,sum=0; AnsiString ss; TempBitmap->PixelFormat = pf24bit; for (j=0; j { ptr_s = (Byte *)Image1->Picture->Bitmap->ScanLine[j]; for (i=0; i { g_s = ptr_s[i*3 2]; g_s1= ptr_s[i*3 1]; g_s2= ptr_s[i*3]; if(g_s2==0&& g_s1==0&& g_s==0) { sum=sum 1; } } } Form1->Edit2->Text=sum;//看黑色pixel數
------
. |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |