-
-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,244 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"display_image_dimensions": [ | ||
2400, | ||
1800 | ||
] | ||
], | ||
"colored_outputs_enabled": true | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
1800 | ||
], | ||
"show_image_level": 0, | ||
"save_image_level": 0 | ||
"save_image_level": 0, | ||
"colored_outputs_enabled": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
1800, | ||
2400 | ||
], | ||
"show_image_level": 0 | ||
"show_image_level": 0, | ||
"colored_outputs_enabled": true | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"outputs": { | ||
"show_image_level": 0, | ||
"show_colored_outputs": true | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
214 changes: 214 additions & 0 deletions
214
samples/Autorotating-samples/1-mobile-camera/template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
{ | ||
"templateDimensions": [ | ||
1846, | ||
1500 | ||
], | ||
"bubbleDimensions": [ | ||
40, | ||
40 | ||
], | ||
"customLabels": { | ||
"Roll": [ | ||
"Medium", | ||
"roll1..9" | ||
], | ||
"q5": [ | ||
"q5_1", | ||
"q5_2" | ||
], | ||
"q6": [ | ||
"q6_1", | ||
"q6_2" | ||
], | ||
"q7": [ | ||
"q7_1", | ||
"q7_2" | ||
], | ||
"q8": [ | ||
"q8_1", | ||
"q8_2" | ||
], | ||
"q9": [ | ||
"q9_1", | ||
"q9_2" | ||
] | ||
}, | ||
"preProcessors": [ | ||
{ | ||
"name": "CropPage", | ||
"options": { | ||
"morphKernel": [ | ||
15, | ||
15 | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "CropOnMarkers", | ||
"options": { | ||
"type": "FOUR_MARKERS", | ||
"referenceImage": "omr_marker.jpg", | ||
"tuningOptions": { | ||
"marker_rescale_range": [ | ||
80, | ||
120 | ||
] | ||
}, | ||
"markerDimensions": [ | ||
35, | ||
35 | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "AutoRotate", | ||
"options": { | ||
"referenceImage": "reference.jpg" | ||
} | ||
} | ||
], | ||
"fieldBlocks": { | ||
"Medium": { | ||
"bubblesGap": 41, | ||
"fieldType": "CUSTOM", | ||
"bubbleValues": [ | ||
"E", | ||
"H" | ||
], | ||
"direction": "vertical", | ||
"fieldLabels": [ | ||
"Medium" | ||
], | ||
"labelsGap": 0, | ||
"origin": [ | ||
170, | ||
282 | ||
] | ||
}, | ||
"Roll": { | ||
"fieldType": "QTYPE_INT", | ||
"fieldLabels": [ | ||
"roll1..9" | ||
], | ||
"bubblesGap": 46, | ||
"labelsGap": 58, | ||
"origin": [ | ||
225, | ||
282 | ||
] | ||
}, | ||
"Int_Block_Q5": { | ||
"fieldType": "QTYPE_INT", | ||
"fieldLabels": [ | ||
"q5_1", | ||
"q5_2" | ||
], | ||
"bubblesGap": 46, | ||
"labelsGap": 60, | ||
"origin": [ | ||
903, | ||
282 | ||
] | ||
}, | ||
"Int_Block_Q6": { | ||
"fieldType": "QTYPE_INT", | ||
"fieldLabels": [ | ||
"q6_1", | ||
"q6_2" | ||
], | ||
"bubblesGap": 46, | ||
"labelsGap": 60, | ||
"origin": [ | ||
1077, | ||
282 | ||
] | ||
}, | ||
"Int_Block_Q7": { | ||
"fieldType": "QTYPE_INT", | ||
"fieldLabels": [ | ||
"q7_1", | ||
"q7_2" | ||
], | ||
"bubblesGap": 46, | ||
"labelsGap": 60, | ||
"origin": [ | ||
1240, | ||
282 | ||
] | ||
}, | ||
"Int_Block_Q8": { | ||
"fieldType": "QTYPE_INT", | ||
"fieldLabels": [ | ||
"q8_1", | ||
"q8_2" | ||
], | ||
"bubblesGap": 46, | ||
"labelsGap": 57, | ||
"origin": [ | ||
1410, | ||
282 | ||
] | ||
}, | ||
"Int_Block_Q9": { | ||
"fieldType": "QTYPE_INT", | ||
"fieldLabels": [ | ||
"q9_1", | ||
"q9_2" | ||
], | ||
"bubblesGap": 46, | ||
"labelsGap": 57, | ||
"origin": [ | ||
1580, | ||
282 | ||
] | ||
}, | ||
"MCQ_Block_Q1": { | ||
"fieldType": "QTYPE_MCQ4", | ||
"fieldLabels": [ | ||
"q1..4" | ||
], | ||
"bubblesGap": 59, | ||
"labelsGap": 50, | ||
"origin": [ | ||
121, | ||
860 | ||
] | ||
}, | ||
"MCQ_Block_Q10": { | ||
"fieldType": "QTYPE_MCQ4", | ||
"fieldLabels": [ | ||
"q10..13" | ||
], | ||
"bubblesGap": 59, | ||
"labelsGap": 50, | ||
"origin": [ | ||
121, | ||
1195 | ||
] | ||
}, | ||
"MCQ_Block_Q14": { | ||
"fieldType": "QTYPE_MCQ4", | ||
"fieldLabels": [ | ||
"q14..16" | ||
], | ||
"bubblesGap": 57, | ||
"labelsGap": 50, | ||
"origin": [ | ||
905, | ||
860 | ||
] | ||
}, | ||
"MCQ_Block_Q17": { | ||
"fieldType": "QTYPE_MCQ4", | ||
"fieldLabels": [ | ||
"q17..20" | ||
], | ||
"bubblesGap": 57, | ||
"labelsGap": 50, | ||
"origin": [ | ||
905, | ||
1195 | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
### AutoRotate Plugin README | ||
|
||
The AutoRotate plugin is designed to automatically rotate an image based on a reference image using template matching techniques. This README provides instructions on how to use the AutoRotate plugin with the provided JSON schema. | ||
|
||
#### Configuration Options | ||
|
||
- **name**: Specifies the name of the plugin. Must be set to `"AutoRotate"` for the configuration to be recognized as applying to AutoRotate. | ||
|
||
- **options**: Object containing configuration options for AutoRotate. | ||
|
||
- **referenceImage**: Relative path to the reference image used for template matching. | ||
|
||
- **markerDimensions**: Dimensions of the reference image. This should be specified as an object containing two positive numbers (see `$def/two_positive_numbers` in your schema). | ||
|
||
- **threshold**: Object defining the threshold parameters for the match score. | ||
|
||
- **value**: Numeric threshold value. If the match score falls below this value, an error or warning may be triggered based on the `passthrough` setting. | ||
|
||
- **passthrough**: Boolean indicating whether to pass through the image without rotation if the score is below the threshold (`true`) or to throw an warning (`false`) for an error | ||
|
||
#### Example Configuration | ||
|
||
```json | ||
{ | ||
"name": "AutoRotate", | ||
|
||
"options": { | ||
"referenceImage": "./path/to/reference_image.png", | ||
|
||
"markerDimensions": [100,150], | ||
|
||
"threshold": { | ||
"value": 100, | ||
|
||
"passthrough": true | ||
} | ||
} | ||
} | ||
``` | ||
|
||
#### Notes | ||
|
||
- Ensure that the `name` field is set to `"AutoRotate"` to activate the plugin. | ||
|
||
- Provide the correct relative path (`referenceImage`) to your reference image. | ||
|
||
- Adjust `markerDimensions` to match the dimensions of your reference image accurately. | ||
|
||
- Configure `threshold` according to your application's requirements for acceptable match scores. | ||
|
||
This README should guide you through configuring and using the AutoRotate plugin effectively with your JSON schema-based configuration files. Adjust parameters as necessary to achieve the desired automatic image rotation based on template matching with a reference image. |
Binary file added
BIN
+106 KB
samples/Autorotating-samples/bonus-marking-grouping/IMG_20201116_143512.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+60 KB
samples/Autorotating-samples/bonus-marking-grouping/IMG_20201116_150717658.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+52.5 KB
samples/Autorotating-samples/bonus-marking-grouping/IMG_20201116_150750830.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
samples/Autorotating-samples/bonus-marking-grouping/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"thresholding": { | ||
"MIN_JUMP": 30 | ||
}, | ||
"outputs": { | ||
"filter_out_multimarked_files": false, | ||
"show_image_level": 0, | ||
"show_preprocessors_diff": true | ||
} | ||
} |
Oops, something went wrong.