SRL Archive - Help

Extrapolate


Le Jingle

2012-08-03 21:06:40

I was just curious if there's a function I might have missed, or if there's a possibility to even create a function that extrapolates a given color at coords x,y with a tolerance .. to build an undefined shape?

Again curious; advice/tips/comments/input appreciated

riwu

2012-08-03 21:46:08

You can use GetColor to return the color at specific coordinate

Le Jingle

2012-08-03 22:57:14

I was thinking something along these lines, something like an outward building TPA.

In the example, if you follow it along from left to right, you see that it starts out with a maroon dot/pixel. Then as it progresses, it builds in (some formula?) outward, following a tolerance that is relevant to the bright red misc. shape; until it reaches the perimeter marked by the orange. (They choice of grey/black dots, are suppose to visualize the process of gathering the surrounding colors)

Footy

2012-08-03 23:33:46

That's some crazy lookin stuff, what are you looking to do with this? Sorry I can't be of assistance, this is way out of my level. PM Brandon if you want, he knows a bit of everything, and he usually responds to my PMs.

Le Jingle

2012-08-03 23:39:47

From: Footy
That's some crazy lookin stuff, what are you looking to do with this? Sorry I can't be of assistance, this is way out of my level. PM Brandon if you want, he knows a bit of everything, and he usually responds to my PMs.


Heh thanks :>
It's ok, I know Brandon does a lot for SRL as it is. This is more of a side project to keep me busy, and if any onlookers want to sprout ideas/comment/etc. they're more than welcome. ;)

Flight

2012-08-03 23:43:33

I'm confused. :S Are you talking about getting the outline of the inner red shape? We have "FindTPAEdges(const p: TPointArray): TPointArray;" which will give you a TPA of all the outlining points of a TPA.

NCDS

2012-08-03 23:48:02

You may also want to look at some of Simba's OCR code for some examples/idea's.

Le Jingle

2012-08-04 00:17:21

Ugh.. started reading the MMLCore/ocr.pas and well.. stuff like:

for i := 0 to high(thachars[j]) do
begin
if (thachars[j][i].x) + ((thachars[j][i].y) * font.width) <= nl then
n[(thachars[j][i].x) + ((thachars[j][i].y) * font.width)] := 1;
end;
gives me a headache for all the reading/catching up with what being done. It's too late, I'll attempt some more tomorrow; thanks for the reference!