作者:fover黄瓜小妞1 | 来源:互联网 | 2023-09-18 09:18
Iamlookingintohowtheintensityofaringchangesdependingonangle.Hereisanexampleofani
I am looking into how the intensity of a ring changes depending on angle. Here is an example of an image:
我正在研究环的强度如何根据角度而变化。以下是图片示例:
What I would like to do is take a circle of values from within the center of that doughnut and plot them vs angle. What I'm currently doing is using scipy.ndimage.interpolation.rotate and taking slices radially through the ring, and extracting the maximum of the two peaks and plotting those vs angle.
我想做的是从该甜甜圈的中心取一圈值并绘制它们与角度的关系。我目前正在做的是使用scipy.ndimage.interpolation.rotate并通过环径向切片,并提取两个峰的最大值并绘制那些与角度的关系。
crop = np.ones((width,width)) #this is my image
slices = np.arange(0,width,1)
stack = np.zeros((2*width,len(slices)))
angles = np.linspace(0,2*np.pi,len(crop2))
for j in range(len(slices2)): # take slices
stack[:,j] = rotate(crop,slices[j],reshape=False)[:,width]
However I don't think this is doing what I'm actually looking for. I'm mostly struggling with how to extract the data I want. I have also tried applying a mask which looks like this;
但是我不认为这是我正在寻找的。我主要是如何提取我想要的数据。我也试过应用一个看起来像这样的面具;
to the image, but then I don't know how to get the values within that mask in the correct order (ie. in order of increasing angle 0 - 2pi)
到图像,但后来我不知道如何以正确的顺序获取该掩码内的值(即按照增加角度0 - 2pi的顺序)
Any other ideas would be of great help!
任何其他想法都会有很大的帮助!
1 个解决方案