oscarkey / extrusionfinder

UG group project: computer vision app which identifies the shape of an extruded object and matches it with a replacement from a catalogue.
Other
0 stars 1 forks source link

Preprocess images from website #31

Closed as2388 closed 9 years ago

as2388 commented 9 years ago

I've got conversion and cleanup working, and rasterization to png, albeit without control over scale. The format for the extrusions seems to be:

<g transform="translate (x, y)">
    <path d="M x1,y1 x2,y2, [x3,y3 ...]"
        <g transform="translate(x, y)">
            <path d="M x1, ..."
                <g transform= ...
                    ....
                </g>
        </g>
</g>

i.e. each polygon is broken into paths composed of one or more straight lines. This is horrible. To apply the XOR algorithm I think we need to recombine these individual path elements into a path for each polygon first... yuck