custom questionnaire

Added by mustafa kurul over 2 years ago

Hi, i want to know that is it possible to design like form in the attachment.
I see that sourge editor generates a pdf file with 2 attachment file sqs and sqm file.

Am i understood rigth below?
In sqm file mark areas and their locations exist lik rect:
<svg:rect x="84" y="800" width="20" height="20"/>

Is it enough modify only sqm file ?
If not, could you explain the way?
Thanks.

form.JPG (247.9 kB)


Replies (8)

RE: custom questionnaire - Added by Hiroya Kubo over 2 years ago

Hi, mustafa!

Thank you for your first posting.

Hi, i want to know that is it possible to design like form in the attachment.

Off course, it is possible!

I see that sourge editor generates a pdf file with 2 attachment file sqs and sqm file.

Exactly.

An sqm file in a pdf file, which is automatically generated by SourceEditor, can be replaced with your manually modified sqm file.

Thus, you can design your own OMR form with using any kind of DTP applications, if you can create your sqm file manually with your text editors or xml editors.

In such cases, you can put a bare sqm file(with ".sqm" suffix) into your source folder which is to be processed by MarkReader.
The bare sqm file in your folder will be work as a substitute of the pdf file with the 2 attachment files.

In sqm file mark areas and their locations exist lik rect:
<svg:rect x="84" y="800" width="20" height="20"/>

Exactly.

I recommend you to render the page set of your OMR form pdf file into bitmap image files at 72 dpi, and then, pick-up the x,y,width,height values.

Is it enough modify only sqm file ?

I think you have to rewrite some sets of svg:metadata/xforms:select elements in your svg:rect elements, too.

If you need help, ask me.

I would appreciate it if you contribute your OMR form's pdf file and sqm file as an example.

Best regards.

RE: custom questionnaire - Added by mustafa kurul over 2 years ago

First of all, thanks very much for your quick answer.
I appreciate you that you wrote such very usefull program.

I would appreciate it if you contribute your OMR form's pdf file and sqm file as an exsample.

ofcourse as soon as i finish, i will publish my forms as a sample in this forum.

Best regards.

RE: custom questionnaire - Added by mustafa kurul over 2 years ago

I tried some custom student identification number filed. I works fine even i rotated the image (%0 error).
Here are my steps:

1) i design my pdf file with out corner rectangles.
2) ı exported pdf to png file in adobe acrobat but i cant see any option with 72 dpi. In your example folder
your png image sizes : 1653x2339. In adobe acrobat (in export png options) there is resolution setting, I setted
300 pixel/inch. My generated png file size: 2481x3509
3) i determine the pixel positions of my markers in original png image, also marker width and heigth (same for all markers)
4) then i recalculated my marker positions according to a4 paper size (595x842)
5) in sqm file there are some point definitions
  • corner data (4 point)
  • upsidedownchecker (2 rect)
  • evenoddchecker (2 rect)
to control this points i resized your sample png image to a4 size:
3 of 4 corner data points to center of black rectanges at the corners of the png image
but 1 point (rigth upper black rectange) doesnt point to center of that black point. (I confused?).
also where must point upsidedownchecker and evenoddchecker ?

6) because of the confusion of that points i copied header and footer part of your sample png to my png.
i copy and paste your masterpage meta data to my sqm file.

that is it it worked. Is my path correct?

identity_number.rar (522.7 kB)

RE: custom questionnaire - Added by Hiroya Kubo over 2 years ago

Hi, mustafa!

I'm very grad to hear your success.

mustafa kurul wrote:

1) i design my pdf file with out corner rectangles.
2) ı exported pdf to png file in adobe acrobat but i cant see any option with 72 dpi. In your example folder
your png image sizes : 1653x2339. In adobe acrobat (in export png options) there is resolution setting, I setted
300 pixel/inch. My generated png file size: 2481x3509
3) i determine the pixel positions of my markers in original png image, also marker width and heigth (same for all markers)
4) then i recalculated my marker positions according to a4 paper size (595x842)

You are right.

I think it would be a little more easier to modify your sqm file as follows:
  • set svg:svg/@svg:width value to "2481"
  • set svg:svg/@svg:height value to "3509"

And then, you could have used your maker positions in original png image and skipped step 3) and 4).

5) in sqm file there are some point definitions
  • corner data (4 point)
  • upsidedownchecker (2 rect)
  • evenoddchecker (2 rect)

to control this points i resized your sample png image to a4 size:
3 of 4 corner data points to center of black rectanges at the corners of the png image
but 1 point (rigth upper black rectange) doesnt point to center of that black point. (I confused?).

Please see this illustration:

(99,29)----(497,29)
   | 1       2 |
   |           |
   |           |
   |           |
   |           |
   |           |
   |           |
   |           |
   | 3       4 | 
(94,810)---(492,810)

also where must point upsidedownchecker and evenoddchecker ?

UpsideDownChecker:

It is very often that there are some upside down sheets in your heap of OMR form sheets to be scanned.
To find out the the upside down OMR form sheets, the black rectangles at the upper left corner and at the lower left corner are distinguished by their width. The lower black rectangles are half width of upper black rectangles. So you must point the position of the upper left and the lower left black rectangles.

EvenOddChecker:

You can print your OMR form on dual-side of your sheet if it has 2 or more pages per a respondent.
On the ODD page, there is a "page number area" at the bottom RIGHT corner.
On the other hand, on the EVEN page, there is at the bottom LEFT corner.
Suppose you scan a heap of OMR form sheet. They should be scanned correctly like this: ODD, EVEN, ODD, EVEN, ODD, EVEN, ...
However, sometimes they might be scanned like this: ODD, EVEN, EVEN, ODD, ODD, EVEN, ...
This shows that the second sheet might be accidentally reversed.
So you must point the positions of the page number areas, at the bottom LEFT corner and the bottom RIGHT corner.

BTW, You may not want to use these features, so I have added some code in trunk, to disable them by comment out <upsideDownChecker/> element and/or <evenOddChecker/> element in your sqm file.

6) because of the confusion of that points i copied header and footer part of your sample png to my png.
i copy and paste your masterpage meta data to my sqm file.
that is it it worked. Is my path correct?

Correct! Thank you very much.

RE: custom questionnaire - Added by mustafa kurul over 2 years ago

Wow! you explained perfectly what i asked. Thanks so much :)
I will desing my omr forms as you described.
when i finish my full form i will publish them.
すべての尊重と

RE: custom questionnaire - Added by Hiroya Kubo over 2 years ago

Good luck! Your OMR forms will be good examples for SQS users.

Now I start to plan developing WYSIWYG OMR form editor for SQS2.2 milestone.
I would be very happy if you send me your suggestion about it upon your experience with designing your own OMR forms.

Thanks in advance,

RE: custom questionnaire - Added by mustafa kurul over 2 years ago

Again hi,
When i was searching about omr java program in the internet, i encountered a simple omr java program.
program recognizes templates in that way:
1) you design your form (you cant change size of mark width and heigth)
2) print out the designed form and fill all marks carrefully by hand.
3) then scan that filled form carefully.
3) after that you give that image to program to resolve positions of filled circle marker positions.
4) program in fact converts template image to gray scale and do some image manipulations (i.e scale, median filter) to detect the position of marks
then generate a config file.
5) then you give the readed image and config file and programs detect them.

can that method be integrated in source editor?

or may be users design their forms their own way, and they crop ony one mark image and gives them source editor, then
source editor finds the matched positions in the form. Could be possible?

RE: custom questionnaire - Added by Hiroya Kubo over 2 years ago

Mustafa,

Thank you for your comment!

I also have seen some products of OMR template recognizer software, and I suppose that there is some OMR software which can export its OMR form definitions to external data files.
It may be possible to develop some kind of converters from these data files to sqm files.

BTW, here is the user forum. If we will continue this discussion related to development, we shall go to http://dev.sqs2.net/boards/3/topics/show/13

Thanks again!

(1-8/8)