:=bmpout.Canvas.Pixels [i, j];:=GetRValue (color);:=GetGValue (color);:=GetBValue (color); ((r> 95 ) and (g> 40) and (b> 20) and (r> g) and (r> b) and (abs (rg)> 15) and ((max (r, g, b)-min (r , g, b))> 15)) or ((r> 220) and (g> 120) and (b> 170) and (abs (rg) <= 15) and (r> b) and (g> ; b)) then [i, j]:=true else colshkr [i, j]:=false; ((r> 0) or (b> 0) or (g> 0)) then:=r;:= g;:=r; p:=p + g; p:=p + b;:=rr / p - 1/3;:=gg / p - 1/3; gg=0 then t:=0; gg> ; 0 then t:=(arctan (rr / gg)) / (2 * pi) +1 / 4; gg <0 then t:=(arctan (rr / gg)) / (2 * pi) +3 / 4 ; ((t>=0.45) and (t <= 0.65) and colshkr [i, j]) then colshkr [i, j]:=truecolshkr [i, j]:=false; colshkr [i, j]:= false;; i:=1 to bmpin.Width doj:=1 to bmpin.Height do:=bmpin.Canvas.Pixels[i,j];:=GetRValue(color);:=GetGValue(color);:=GetBValue(color);:=round(0.3*r+0.59*g+0.11*b);.Canvas.Pixels[i,j]:=rgb(r,r,r);;i:=2 to (bmpp.Width - 1) doj:=2 to (bmpp.Height - 1) do [1]:=getrvalue (bmpp.Canvas.Pixels [i - 1, j - 1]); [2]:=getrvalue (bmpp.Canvas.Pixels [i, j - 1]); [3]:=getrvalue (bmpp.Canvas.Pixels [i +1, j - 1]); [4]: ??= getrvalue (bmpp.Canvas.Pixels [i - 1,j]);[5]:=getrvalue(bmpp.Canvas.Pixels[i,j]);[6]:=getrvalue(bmpp.Canvas.Pixels[i+1,j]);[7]:=getrvalue(bmpp.Canvas.Pixels[i- 1,j+1]);[8]:=getrvalue(bmpp.Canvas.Pixels[i,j+1]);[9]:=getrvalue(bmpp.Canvas.Pixels[i+1,j+1]);:=abs(z[7]+2*z[8]+z[9]-z[1]- 2 * z [2]-z [3]);:=abs (z [3] +2 * z [6] + z [9]-z [1] - 2 * z [4]-z [7 ]);:=abs (z [2] +2 * z [3]-z [4] + z [6] - 2 * z [7]-z [8]);:=abs (2 * z [ 9] + z [8] + z [6]-z [4]-z [2] - 2 * z [1]);:=50; ((h1> x) or (h2> x) or (h3> ; x) or (h4> x)) then bmpp.Canvas.Pixels[i,j]:=clBlackbmpp.Canvas.Pixels[i,j]:=clWhite;;(bmpin,bmpout,colshkr);.Picture.Assign(bmpout);.AutoSize :=True;. AutoSize:=false;:=Image3.Height / h;:=Image3.Width / w; (HH> WW) then.Height:=trunc (Image3.Height / HH);. Width:= trunc (Image3.Width / HH);. Stretch:=True;. Height:=trunc (Image3.Height / WW);. Width:=trunc (Image3.Width / WW);. Stretch:=True;;;. unit znahodjennia_oblycca;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,, ExtDlgs, StdCtrls, ExtCtrls, Jpeg, Math;=class (TForm): TOpenPictureDialog;: TButton;: TImage;: TButton;: TImage; Button1Click (Sender: TObject); Button2Click (Sender: TObject);
{Private declarations}
{Public declarations};: TForm1;
{$ R *. dfm} boolarr=array [1 .. 1000,1 .. 1000] of boolean; h=400; w=400; pi=3.1415926535897932384626433832; bmpin, bmpout: TBitmap; , WW: real; Ellipse (X, Y, A, B: integer; Angle: real);, S, C, H2, K1, K2, R: real;, X2, Y1, Y2, X3, Y3, X4, Y4, YY: integer ;:=(180-Angle) * PI/180;:=Sin (I);:=Cos (I);:=Sqr (A * S) + Sqr (B * C); H2=0 then:=0 ;:=0;:=S * C * (Sqr (A)-Sqr (B)) / H2;:=A * B/H2;;:=0; Sqr (YY) <= H2 do:=K2 * Sqrt (H2-Sqr (YY));:=Round (K1 * YY + R);:=Round (K1 * YY-R);. Canvas.Pen.Color:=clRed; YY=0 then.Canvas.Pixels[X+X1,Y+YY]:=bmpout.Canvas.Pen.Color;.Canvas.Pixels[X-X1,Y-YY]:=bmpout.Canvas.Pen.Color;.Canvas.MoveTo(X+X1,Y+YY);.Canvas.LineTo(X+X3,Y+YY- 1);. Canvas.MoveTo (X + X2, Y + YY);. Canvas.LineTo (X + X4, Y + YY - 1);.Canvas.MoveTo(X-X1,Y-YY);.Canvas.LineTo(X-X3,Y-YY+1);.Canvas.MoveTo(X-X2,Y-YY);.Canvas.LineTo(X-X4,Y-YY+1);;:=X1;:=X2;(YY);;:=Int(1.99*(YY-Sqrt(H2)));.Canvas.MoveTo(X+X3,Y+YY- 1);. Canvas.LineTo (X + X3-Round (R), Y + YY-Round (H2));. Canvas.LineTo (X + X4, Y + YY - 1);.Canvas.MoveTo(X-X3,Y-YY+1);.Canvas.LineTo(X-X3+Round(R),...