Co Registration¶
The co registration plugin is capable of taking two images, using an OpenCV SURF algorithm based on user input to determine their relative orientation. This image can then be saved as a single file.
Theory¶
The plugin uses a SURF algorithm to match points on two separate images and determine their orientation next to each other. This is done on a single wavelength meaning the selection of a proper wavelength with enough contrast is important.
Using the plugin¶
- Select two files in the TIPP interface that you want to combine. Then run the co registration plugin and you will be greeted by two windows. First the control window:
- Set the hessian threshold. I can not give you a required value since it will vary greatly depending on the image used.
- Set the quality threshold. The result from the SURF algorithm is a series of matches which have a certain quality associated with them. What the program does is take all the matches that fall BELOW the value you input and average their distance in X and Y direction. By setting the threshold to a lower value you discard more matches and ‘should’ get a higher quality translation, however set it too low and there will be no matches left for translation.
- The Upright variable determines whether you want to take the orientation of certain ‘blobs’ in the image into consideration. Again it will vary greatly on the image if this will help you in any way.
- If you are happy with the settings press the ‘SURF’ button. You will see that after some calculating the images that are displayed in the window will shift position. Please note that you can only press the ‘SURF’ button after both images have rendered, if one of them has not been loaded yet an error will occur.
- The result of the SURF algorithm can be fine tuned by manually shifting the images.
- Export the file by using the export button and save it as normal.
- Store the relative distances in the project metadata with the Store Metadata button. The image can then later be made with the Construct HSI Project File plugin.
Limitations¶
There are some limitations to the plugin currently. The performance of the SURF algorithm has not been optimized yet. Meaning that it is ‘simply’ being ran in python without considering any multiprocessing options.
The main result of restrictions from the ‘exporting’ end of the program is that currently only four orientations are supported as seen below:
This means that a case where image B being smaller than A in one dimension and fitting ‘inside’ the boundaries set by image A is not possible. This requires more complex saving and will be added in future iterations.