简体   繁体   English

图像的高斯平滑单位

[英]Unit of a gaussian smoothing of an image

I had a raster with values from 0 to 0,3 which I transformed into an image.我有一个值从 0 到 0,3 的栅格,我将其转换为图像。 Then i gave all values <=0.3 the value 1. I thought it makes it easier if i calculate this for a single value.然后我给所有值 <=0.3 的值 1。我认为如果我为单个值计算它会更容易。 I applied Gaussian smoothing to the image and then converted it back to a raster.我对图像应用了高斯平滑,然后将其转换回栅格。 For the smoothing I used the Smooth.Im function of the spatstat package.对于平滑,我使用了Smooth.Im package 的 Smooth.Im function。 However, I do not know which unit my scale has.但是,我不知道我的秤有哪个单位。 Does it have something to do with pixel density or how can I understand the unit?它与像素密度有关还是我如何理解单位? I have attached an image as an example我附上了一张图片作为例子

例子

Thank you and best regards感谢你并致以真诚的问候

ıf we talk about image filtering etc., for example blurring or deblurring, the applied filters obey the rule of energy conservation which is satisfied when the sum of the members of the filter is equal to '1'.如果我们谈论图像过滤等,例如模糊或去模糊,则应用的过滤器遵循能量守恒规则,当过滤器的成员之和等于'1'时满足该规则。 So, if your filter obey this rule, ı dont think your unit is changed after smoothing process.所以,如果你的过滤器遵守这个规则,我不认为你的单位在平滑过程后会改变。

Smooth.im is a function in the spatstat package family. Smooth.imspatstat package 系列中的 function。 It performs kernel smoothing of the input image.它对输入图像执行 kernel 平滑处理。

The value of the output at a pixel i , say, is equal to a weighted average of the values of the input at pixels j with weights w(i,j) .例如,像素i处 output 的值等于权重为w(i,j)的像素j处输入值的加权平均值。 The weights sum to 1 (ie for any i , the sum of w(i,j) over all j is equal to 1.) The weights w(i,j) get smaller as the distance between i and j increases.权重总和为 1(即对于任何i ,所有j上的w(i,j)之和等于 1。)随着ij之间距离的增加,权重w(i,j)变得更小。 So, the output pixel value is basically an average of the input pixel values in a neighbourhood.因此,output 像素值基本上是邻域中输入像素值的平均值。

If the input image pixel values were measurements expressed in some unit (say weights expressed kilograms), then the output image pixel values are expressed in the same unit, and are averages of the input values.如果输入图像像素值是以某种单位表示的测量值(例如重量表示为千克),则 output 图像像素值以相同单位表示,并且是输入值的平均值。

If I understand your question, your input image has only the pixel values 0 and 1. The output image pixel values are weighted averages of these 0/1 values, which may lie anywhere between 0 and 1.如果我理解您的问题,您的输入图像只有像素值 0 和 1。output 图像像素值是这些 0/1 值的加权平均值,可能介于 0 和 1 之间。

For further explanation see Chapter 6 of the spatstat book有关进一步的解释,请参阅spatstat 书的第 6 章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM