Jiadong
Jiadong

Reputation: 2072

How to get intensity function along specific direction in Python image processing (module: numpy, scipy, skimage)

Now, I can get the intensity function of along horizontal and vertical direction using following code:

import matplotlib.pyplot as plt
from skimage import data

# Load the image
image = data.coins()

imgslice = 120

# Vertical intensity function
plt.plot(image[imgslice], 'r')

But I want to get intensity function along certain directions. For example along a line from point A to point B. How can I achieve this?

Upvotes: 0

Views: 960

Answers (1)

Shiyu
Shiyu

Reputation: 110

You can use gabor filter to get the intensity for a specific direction. A python version is implemented in OpenCV. Here is a very detailed tutorial (https://cvtuts.wordpress.com/2014/04/27/gabor-filters-a-practical-overview/)

Upvotes: 1

Related Questions