Arg0s1080 / mrz

Machine Readable Zone generator and checker for official travel documents sizes 1, 2, 3, MRVA and MRVB (Passports, Visas, national id cards and other travel documents)
GNU General Public License v3.0
328 stars 122 forks source link

how to generate image #44

Open phamkhactu opened 1 year ago

phamkhactu commented 1 year ago

Thanks for great repo. I read from tutorial, maybe I miss information for generate to image I see issue can create basic information passport, But i want to check by see the info in image My question is: " how to generate passport with my background and save it to image?" Many thanks

ottosman commented 1 year ago

Dear friend first of all i have to mention that my comment will be for you but don't forget i am a ordinary user as you.

I check the example folder of this repo about id card examples and noticed that creator of the repo has a line of code which "import examples.functions.functions as oi " or "import examples.functions.functions as open_image" and these are example codes, i mean there are no libraries existing for their return. You may check matplotlib/cv2/PIL libraries or even if you surf on the internet for this topic i'm hundred percent sure that you can find your answer in stackoverflow, you can search as for example: "How to create a valid visual document of X id card while i have the elements" or "How to visualize the text to image in such order"

Regards.

Batterlake commented 1 year ago

Hi! You may want to use another open source library such as this one to generate images with text. To render MRZ codes you may need a specific font. You can find ocr fonts here.

xulihang commented 9 months ago

I use this library to build a synthetic dataset. You can find how I do it in this blog: https://www.dynamsoft.com/codepool/synthetic-mrz-images-dataset.html