dedoardo / polyfit

Perception-aligned clip-art vectorization
MIT License
39 stars 10 forks source link

I want to vectorize natural raster images, but it always fails. #6

Open SwordHolderSH opened 2 years ago

SwordHolderSH commented 2 years ago

Thanks a lot! I want to vectorize natural raster images as shown in Figure 23 in that paper, but it always fails.

The CMD shows that:

" P:\Program\polyfit>polyfit.exe "./img/t1.png" "./trained/random_forest_paper.txt" ./curves-fill.svg Input image: ./img/t1.png Output svg: ./curves-fill.svg Classifier: ./trained/random_forest_paper.txt P:\Program\polyfit\source\polyvec\image-segment\image_segment.cpp: 954 - Failed expression: false " I think there are some issues in image_segment.cpp.

dedoardo commented 2 years ago

Hey @SwordHolderSH , I am aware that there are some bugs with complex topologies in the image segmentation stage and when stitching polygons together to create a watertight mesh. I will take a look in the coming weekends to see if I can fix this issue specifically. Admittedly, I have already worked a bit on debugging the code but I have also started a new job/moved countries not so long ago so I haven't had much time to dedicate to it.

dedoardo commented 1 year ago

Replying to this became a resolution for the new year, sorry. The current segmentation pass has a big limitation because it doesn't use half edges and is unable to disambiguate the following case during boundary extraction. image I don't consider this closed but also don't have an exact timeline of when it's going to happen as I am not currently working on it. It will also require some debugging of the rest of the algorithm. Will update when I have news.