View Full Version : grass fire algorithm
05-04-2002, 02:16 AM
can some one tell me how a grass fire algorithm works and how to use it for selecting neighboring pixels of a chosen pixel in an image ???
05-06-2002, 06:25 AM
Essentially you start by selecting one pixel in the image. Then for each neighbouring pixel (up to eight) you test if that pixel is the same as the one selected. If so you also select that pixel and repeat the test on the new pixel's neighbours. You repeat this for each new pixel selected until there are no more selectable pixels. You can use this for exact colour matches, or you can use a tolerance level that selects pixels that only differ slightly to the one selected.
05-07-2002, 04:24 AM
thats what i exactly need for my project now... i gotto select a pixel and then set a tolerance level to select all the neghboring pixels of a similar(not same) color value.
can u give me a typical code for the algorithm,pls ???
05-10-2002, 06:31 AM
I know the theory but never tried to code it. Hopefully someone else can help. If not try google again.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.