bbenligiray / stag

STag: A Stable Fiducial Marker System
MIT License
187 stars 52 forks source link

Problem with STag generstor #17

Open sixer51 opened 3 years ago

sixer51 commented 3 years ago

I tested the provided tag generator, but the output is something like this: image

If I stop it before eroding and dilating, the output stag is image

Could you provide any suggestions on solving this problem?

bbenligiray commented 3 years ago

The image on the bottom looks right, this needs to be eroded-dliated a few times to smooth the pattern edges and the top left label needs to be printed. With the top one, the background seems to have been set to transparent, or maybe it's to do with how the file is being saved. If you're sure that you didn't change those yourself, try saving the image as a JPG.

sixer51 commented 3 years ago

Thanks for your suggestion. The bottom image is to show that before eroded-dilated, it still looks fine, but after that, the image isn't shown as expected. I think that there should be something wrong with the eroded-dilated process.

It seems that the value in this line should be 0 instead of 255, but it still cannot solve my problem. https://github.com/bbenligiray/stag/blob/6ea0f3b1fca9e64676ff9f7fa15a54b4663f44ef/ref/marker%20generator/Form1.cs#L321

I tested saving the image as JPG, but it is still wrong. 00001_jpg