Steps to reproduce: run getMrz on this image:

Full error log:
RangeError: crop: origin (x:-206, y:187) out of range (268; 186)
at Image.crop (/Users/fresh/Work/application-nest/backend/node_modules/image-js/lib/image/transform/crop.js:44:11)
at Image._Image.default.<computed> [as crop] (/Users/fresh/Work/application-nest/backend/node_modules/image-js/lib/image/core/extend.js:42:21)
at internalGetMrz (/Users/fresh/Work/application-nest/backend/node_modules/mrz-detection/src/getMrz.js:224:24)
at getMrz (/Users/fresh/Work/application-nest/backend/node_modules/mrz-detection/src/getMrz.js:25:12)
at MrzService.cropImg (/Users/fresh/Work/application-nest/backend/dist/backend/src/mrz-detection/mrz.service.js:21:20)
at processTicksAndRejections
(node:internal/process/task_queues:96:5)
at async MrzController.getUserDocuments (/Users/fresh/Work/application-nest/backend/dist/backend/src/mrz-detection/mrz.controller.js:25:32)
Seems to be because it is proposing a ROI that it out of bounds. I found a similar discussion here: https://answers.opencv.org/question/70953/roi-out-of-bounds-issue/
First time reporting an issue, let me know if you need anything else from me.
Steps to reproduce: run getMrz on this image:
Full error log:
Seems to be because it is proposing a ROI that it out of bounds. I found a similar discussion here: https://answers.opencv.org/question/70953/roi-out-of-bounds-issue/
First time reporting an issue, let me know if you need anything else from me.