Fit image to target

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

Post Reply
HCACI
Posts: 6
Joined: Tue Dec 05, 2017 9:00 am

Fit image to target

Post by HCACI »

Hello,

I have a huge number of pages I want to prepare for Optimal Mark Recognition (OMR). This means each page must be fitted to a target image for the OMR software reliability spot the marks (i.e. answers to items of a questionnaire). For any reason, when I scan the pages the result varies slightly in alignment and scale. The "redress" option of XnView does a great job but I need another transformation. My idea is that the image should be further rotated and rescaled so that a pre-defined line (x1,y1 -> x2,y2) fit a target line. Am I reasoning correctly? Is there any (already existing) possibility?

Thank you in advance for your response.

Best
User avatar
xnview
Author of XnView
Posts: 43597
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Fit image to target

Post by xnview »

sorry but currently there is no such deskew feature
Pierre.
HCACI
Posts: 6
Joined: Tue Dec 05, 2017 9:00 am

Re: Fit image to target

Post by HCACI »

Thank you Pierre for your answer.

I'm new in the field of image processing but I think it's slightly different than a deskew (e.g. https://www.codeproject.com/articles/13 ... w-an-image).

After redressing the image, the (my) idea is to **rescale** the image and **move** it within the page so that the check boxes (i.e. item response) are at the expected position for the OMR scanner to find which are marked. OMR works with fixed coordinates and systematically fails if the image is not stackable on the template. Combined with redress, there would be a total of three successive operations. Maybe a more correct name would be "smart positioning" (http://www.pdfill.com/align_smart_positioning.html)?

Hervé
HCACI
Posts: 6
Joined: Tue Dec 05, 2017 9:00 am

Re: Fit image to target

Post by HCACI »

Hello,

More precisely, here is what I'm looking for: https://imagej.net/Align_Image_by_line_ROI. This feature was requested by others in the last years who also work with scanned images.

In my case, the user would enter the begin and end coordinates of an horizontal (target) line, and the addon would have to find the first line for the top of the image (like what redress does, right?) and align the entire image in such a way that the found line and the target line would be stacked. Any programmer around here interested in coding this?

Hervé
Post Reply