How to find pixels aligned along a certain direction on satellite image?

3 次查看(过去 30 天)
Hi everyone.
I need some help.
This image represents all the hot pixels recognized in a certain period of time by analysis of sentinel-2. As you see on the left there are many anomalous pixels that are not actually really hot, but are recognized as anomalous because of the seam/stripes artifact effect in the sentinel-2 images.
I need to eliminate these pixels. Is there an automatic way to recognize pixels aligned in a certain direction, and/or to recognize automatically those pixels on the left part of the image?
Thanks!
  1 个评论
Josh
Josh 2024-5-9
编辑:Josh 2024-5-9
are you wanting to do this over and over again? ...as in need to implement an intuitive solution via code?
if just wanting one-time, you can probably get away with just deleting the pixels with a column value < 14°59'E or using region-of-interest (ROI) image processing (https://www.mathworks.com/help/images/roi-based-processing.html)
otherwise, an image processing algorithm is needed to identify those pixels first. you mention "aligned in a certain direction" but not sure that's going to be an easy approach unless you're wanting to manually draw a line for each image. it seems you have an ROI with high density of pixels and then the pixels scattered around elsewhere are what you want to eliminate. in that case you could use convolution to scan for pixels/regions that are below/above a threshold and elimate the ones below

请先登录,再进行评论。

回答(2 个)

Josh
Josh 2024-5-11
编辑:Josh 2024-5-11
Thinking that's going to be one of the easier options for getting started with a solution:
n=1;
input=imread('testSat.png');
inputGray=im2gray(input);
inputAdj=imadjust(inputGray);
inputBW=imbinarize(inputAdj,'global');
output=bwareafilt(inputBW,n);
imwrite(output,'outputN1.jpg');
imshow(output)
bwareafilt can be used to extract the n largest/smallest objects from a binary image. It can also extract objects of a specified area, but I found the above to be more useful for your situation. Using the image you provided, I get the following for output at various value of n:
n=1
n=2
n=5
n=15
Around n=10 to n=15 the pixels you're seeking to eliminate begin returning. n=1 may work for some of your images, since the traced shape won't be present. However, you may need a higher value of n to preserve the detail of your ROI.
  3 个评论
Josh
Josh 2024-5-11
my approach is still based around pixel/region density vs direction... i'd have to put some more thought into approaching the problem with a solution that relies on direction
Josh
Josh 2024-5-15
移动:Image Analyst 2024-5-15
did my solution work for you? if so, would you please consider accepting my answer?

请先登录,再进行评论。


Image Analyst
Image Analyst 2024-5-15
@fransec see my attached demo on fiber orientation. It identifies the local orientation of every pixel in an image. Adapt as needed.

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by