15,878,430 members
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"
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

Top Experts
Last 24hrsThis month
 Pete O'Hanlon 165 Graeme_Grant 80 Andre Oosthuizen 75 M Imran Ansari 60 Ravi Bhavnani 60
 Pete O'Hanlon 1,585 OriginalGriff 1,240 Richard Deeming 743 Graeme_Grant 700 Dave Kreskowiak 549

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