2020 09 01 Using other filtering methods to augment line direction - syntaxmonkey/Thesis GitHub Wiki

Using histogram of oriented gradients

This example has an interesting example. They create gradients and generate an image based on the directions of the gradient. The example utilizes 8 directions. Can we increase that to 72 directions. This would provide 5 degree buckets.

https://scikit-image.org/docs/dev/auto_examples/features_detection/plot_hog.html#sphx-glr-auto-examples-features-detection-plot-hog-py

Try using OpenCV implementation of Structure Tensor:

https://www.ccoderun.ca/programming/doxygen/opencv/tutorial_anisotropic_image_segmentation_by_a_gst.html

Successfully get the method to run and able to test on our images.

The method returns two matrices: coherency and orientation. Not clear how to utilize the information in the matrices. Do we simply average the pixel values across each mask region?

Understanding Structure Tensor Eigenvectors and Eigenvalues

Not clear which components will produce the eigenvectors.

https://stackoverflow.com/questions/23171991/what-does-eigen-value-of-structure-tensor-matrix-denote/23172317#23172317

Another slide deck describing eigenvectors.

https://courses.cs.washington.edu/courses/cse455/09wi/Lects/lect6.pdf

More information on how to calculate the EigenVector: https://www.mathworks.com/matlabcentral/fileexchange/12362-structure-tensor-introduction-and-tutorial

Additional reading on constructing the eigenvectors: https://machinelearningmastery.com/introduction-to-eigendecomposition-eigenvalues-and-eigenvectors/

Calculating the direction.

Latex:

[u,v]\begin{bmatrix} J11 & J12\\ J12 & J22 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix}

\rightarrow

\begin{bmatrix} u*J11 + v*J12 & u*J12+v*J22 \end{bmatrix}

\begin{bmatrix} u \\ v \end{bmatrix}

\rightarrow

\begin{bmatrix} u*(u*J11 + v*J12) & v*(u*J12+v*J22) \end{bmatrix}

Rules for rotating coordinates

In some cases, we have to rotate the coordinate system. Here is a site with several simple rotations: https://calcworkshop.com/transformations/rotation-rules/#:~:text=90%20Degree%20Rotation,y%20and%20make%20y%20negative.

Can now produce masked region of the original image

We can now produce masked region of the original image. This will be fed into Structure Tensor object to calculate the desired angle.

TODO: Will need to change the order of operations. Currently we shift the raster image after produce the angle and then generate the contour lines. We will need to shift the raster image and generate the angles before drawing the contour lines.

Color2Gray salience greyscale implementation

Original paper: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiaxLS75tTrAhXPmVkKHQHtBisQFjAEegQIBhAB&url=http%3A%2F%2Fwww.cs.northwestern.edu%2F~ago820%2Fcolor2gray%2Fcolor2gray.pdf&usg=AOvVaw28m2vPB2CZzyEY7MZZqCQv

https://github.com/01akanksha/Spring2017Color2Gray