View Full Version : Extrapolate
Le Jingle
08-04-2012, 01:06 AM
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
You can use GetColor to return the color at specific coordinate
Le Jingle
08-04-2012, 02:57 AM
I was thinking something along these lines, something like an outward building TPA.
http://i.imgur.com/drbS2.png
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
08-04-2012, 03:33 AM
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
08-04-2012, 03:39 AM
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
08-04-2012, 03:43 AM
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.
You may also want to look at some of Simba's OCR code for some examples/idea's.
Le Jingle
08-04-2012, 04:17 AM
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!
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.