Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am working curently on CFAR implementation to detet objects from satellite images "SAR". I have done the implementation using double loops to iterate over all pixels. Noramlly SAR images are 16k*12k pixels. I use python to perform mean and standard devaition for each pixel. The code is extremely slow. I want you to help me , kindly, how to compute the mean and standard deviation for the background pixels without using loops. The sliding window that I want is rectangle has target, guard and background pixel. "inner and outer rectangles"
please see the strucure of sliding window by this link:
Two-dimensional constant false alarm rate (CFAR) detector - Simulink[^]

The main question is: How can I compute the mean and standard deviation for the only background pixels "Green pixels in the sliding CFAR window in the above link "under algorithm section"". It is not only computing standard deviaiton around target pixel.
By other words:
Two Rectangles : outer and inner, you want to compute the mean and standard deviation for outer rectangle wihtout using loops. The process should be rolled over entire pixels of the image.

What I have tried:

I have tried to work with
pandas.core.window.rolling.Rolling.std

This implementation compute the standard deviation for the neghibour pixels, but my case is I need to compute the standard deviation for the pixels are far away from target pixel.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900