N
nanshan
Unregistered / Unconfirmed
GUEST, unregistred user!
[
]
function Isplatecolor(pp: pRGBTripleArray; qx, zx, Y: word): word;
var
i, hw, la, ba, he: word;
r, g, b: word;
begin
hw := 0;
la := 0;
ba := 0;
he := 0;
Result := 0;
for i := qx to zx do
begin
r := pp.rgbtRed + 1;
g := pp.rgbtGreen + 1;
b := pp.rgbtBlue + 1;
if ((r / g) > 0.7) and ((b / g) > 1) and ((r / b) > 1) then
Exit;//这里的exit调试的时候断点是打叉的,明显不执行,不知道为什么。
if (r > 200) and (g > 200) and (b > 200) then
INC(ba) else
if (r < 50) and (g < 50) and (b < 50) then
INC(he) else
if ((r / g) > 1) and ((g / b) > 5) and ((r / b) > 9) then
INC(hw) else
if ((b / g) > 1.8) and ((g / r) > 1.5) and ((b / r) > 3) then
INC(la);
end;
if (ba > ((zx - qx) div 3)) then
Result := 3;
if (he > ((zx - qx) div 2)) then
Result := 4;
if (hw > ((zx - qx) div 8)) then
Result := 1;
if (la > ((zx - qx) div 5)) then
Result := 2;
end;
![Frown :( :(](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f641.png)
function Isplatecolor(pp: pRGBTripleArray; qx, zx, Y: word): word;
var
i, hw, la, ba, he: word;
r, g, b: word;
begin
hw := 0;
la := 0;
ba := 0;
he := 0;
Result := 0;
for i := qx to zx do
begin
r := pp.rgbtRed + 1;
g := pp.rgbtGreen + 1;
b := pp.rgbtBlue + 1;
if ((r / g) > 0.7) and ((b / g) > 1) and ((r / b) > 1) then
Exit;//这里的exit调试的时候断点是打叉的,明显不执行,不知道为什么。
if (r > 200) and (g > 200) and (b > 200) then
INC(ba) else
if (r < 50) and (g < 50) and (b < 50) then
INC(he) else
if ((r / g) > 1) and ((g / b) > 5) and ((r / b) > 9) then
INC(hw) else
if ((b / g) > 1.8) and ((g / r) > 1.5) and ((b / r) > 3) then
INC(la);
end;
if (ba > ((zx - qx) div 3)) then
Result := 3;
if (he > ((zx - qx) div 2)) then
Result := 4;
if (hw > ((zx - qx) div 8)) then
Result := 1;
if (la > ((zx - qx) div 5)) then
Result := 2;
end;