-1

I had a raster with values from 0 to 0,3 which I transformed into an image. Then i gave all values <=0.3 the value 1. I thought it makes it easier if i calculate this for a single value. 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. 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

Example

Thank you and best regards

Maik
  • 1
  • 1
  • 1
    It is impossible to know from your description. Please provide more details. Ideally a reproducible example. Also, it is unclear at this point how your question is related to the R package spatstat as indicated by the tag you used. – Ege Rubak Sep 06 '22 at 12:08

2 Answers2

1

Smooth.im is a function in the spatstat package family. It performs kernel smoothing of the input image.

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). The weights sum to 1 (i.e. 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. So, the output pixel value is basically an average of the input pixel values in a neighbourhood.

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.

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.

For further explanation see Chapter 6 of the spatstat book

Adrian Baddeley
  • 2,534
  • 1
  • 5
  • 8
-2

ı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'. So, if your filter obey this rule, ı dont think your unit is changed after smoothing process.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 08 '22 at 00:33
  • After applying the smooth.im function i get a completely new scale. This doesn't even reflect my original values ​​anymore. Oddly enough, the scale changes regardless of the pattern. The pattern remains the same even if the scale should change. So I don't know. – Maik Sep 08 '22 at 11:11
  • I could not understand that after applying smoothing to your data why your result did not reflect your original data anymore. I guess, you directly gave your data which changes between 0-0.3 to the 'Smoothing.Im ' and that can be problem. Could you convert your original data to 0-255 ranged image and give to the smooting function. Than, convert the smoothed image back to your original data range (0-0.3). – ahmetarsss Sep 08 '22 at 12:08
  • I forgot to mention that I converted a range from 0 to 0.3 to a simple value of 1. That smoothing only works with one value. – Maik Sep 08 '22 at 13:57