How to capture Histogram Oriented Gradients in the visualisation figure?

238 Views Asked by At

Firstly, many apologies if this question has been posted/asked/answered (let me know the link if that is the case). How do I capture the HOG values displayed/plotted on the visualisation figure in Matlab?For example in this link (Matlab) https://uk.mathworks.com/help/vision/ref/extracthogfeatures.html

img = imread('cameraman.tif');
[featureVector,hogVisualization] = extractHOGFeatures(img);

%Plot HOG features on the original image    
figure;
imshow(img);
hold on;
plot(hogVisualization);

What I don't understand is when I open 'hogVisualization' in matlab the values which are plotted in the image don't make sense. Where can I find the values plotted on the original image?

To be more specific, here is what I'm trying to do. In this image here > phase I'm trying to detect the lines in the red region (I can detect these lines). However, as you can see these lines are disconnected in the blue region. In my algorithm, I need to track which direction I should go (e.g. to the left, right or to a certain angle direction) when it reaches the disconnected line.

For this purpose, I used HOG to find the orientation. Visually, I can see the correct orientation when I visualise it, which can be used to connect two disconnected lines within the blue region. But the problem is I need to find the values plotted in the image. How do I get these values? I can see them visualised on the image but I can't retrieve the actual numerical values.

Thanks, Erick

0

There are 0 best solutions below