Can someone give me an example of how I can extrude a single geometry from a specific color say black, yellow etc? I’m trying to basically get the parameters from a image say length and width for rectangles and i would color it black and say red for sphere and get the radius, not sure how to get the param from drawings
may be clear in your mind but it is pretty hard to understand what exactly you are looking for ?
My apologies for being unclear, basically I want to make say extrusions from a white picture image with different shapes. I figured to make things easier I would use certain colors on the backgrounds to indicate which shape to use. From those shapes the parameters for the height and length or the diameter can be found and I can extrude them all from the white background.
I just need to find the different heights and widths of the different shapes so that I can add them to a parameter and extrude them from the picture.
ok so you want to be able to detect sphere & rectangle (and not arbitrary shapes) drawed on a white background image, that’s it ? (I supposed that the image will be clean and have no noise ?)
if that is the case, you could use a modified Flood Fill which puts the xy pairs in a list and deletes the flooded pixels from the image. Repeat flooding the image until there are no original pixels left. Then you can examine the lists (one list per shape), which should be easy.
circle diameter -> maximum distance of xy pairs
center -> (sum of xy pairs)/(pair count)