mrz icon indicating copy to clipboard operation
mrz copied to clipboard

how to generate image

Open phamkhactu opened this issue 2 years ago • 3 comments

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

phamkhactu avatar Mar 02 '23 04:03 phamkhactu

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.

ottosman avatar Mar 10 '23 08:03 ottosman

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.

Batterlake avatar May 25 '23 10:05 Batterlake

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

xulihang avatar Oct 18 '23 01:10 xulihang