Insufficient amount of SIFT matches
lionlai1989 opened this issue · 9 comments
Hi the team of CARS:
I am running CARS on a pair of Pleiades stereo imagery as shown below. As you can see, there are many clouds and NoData pixels in the raster.
The CARS outputs the following error:
$ cat 22-10-11_09h16m_sensor_to_full_res_dsm.log
22-10-11 09:22:08 :: ERROR :: Insufficient amount of matches found (< 100), can not safely estimate epipolar error correction and disparity range
22-10-11 09:27:21 :: ERROR :: CARS terminated with following error
Traceback (most recent call last):
File "/cars/venv/lib/python3.8/site-packages/cars/cars.py", line 172, in main_cli
used_pipeline.run()
File "/cars/venv/lib/python3.8/site-packages/cars/pipelines/sensor_to_full_resolution_dsm/sensor_to_full_resolution_dsm_pipeline.py", line 327, in run
matches_array = self.sparse_matching_app.filter_matches(
File "/cars/venv/lib/python3.8/site-packages/cars/applications/sparse_matching/sift.py", line 649, in filter_matches
raise ValueError(
ValueError: Insufficient amount of matches found (< 100), can not safely estimate epipolar error correction and disparity range
I checked the source code and found that this is in the TODO list.
My questions are:
-
What is the rationale behind the value 100 matching points? As far as I know, 4 matching points should be sufficient to find the affine fundamental matrix?
-
As the above image shows, it's difficult to find matching points on cloud and water pixels and impossible on NoData pixels. And I believe that CARS is running SIFT on small tiles (500x500 pixels)? It would be great that CARS can continue the pipeline even there are insufficient matching points. Eg, let's say there are 1000 tiles in total. If there is one tile doesn't have enough SIFT points, then CARS can discard that tile and continue the rest 9999 tiles.
Thanks for reading.
Hello @lionlai1989,
We use matching points for epipolar alignement and estimate disparity range.
It is weird that there is less than 100 matching points : I think there is another problem.
Can you send us your data to investigate ? > david.youssefi@cnes.fr
Thanks in advance,
David
I've also been encountering this, I'd be curious of your findings on this issue. I'm also quite surprised about having a low number of matches and wondering what I could do about it?
I didn't find a config parameter to lower this 100
number.
We will add a config parameter to lower this 100 number : @lionlai1989 : we await your data to investigate.
Thanks!
We will add a config parameter to lower this 100 number : @lionlai1989 : we await your data to investigate.
Hi:
Due to the data agreement with the data provider (Airbus), I can't send the problematic data to you. I am still trying to figure out a way to solve this. Thanks for your attention.
Can you contact us by e-mail (david.youssefi@cnes.fr) ? I think we can figure it out.
We were not able to reproduce the bug with the data we found. Perhaps you can contact the supplier so that you can transfer your exact data to us? I suggest you reopen this issue if you manage to transfer the data to us.
Hello !
I am using CARS top produce a DSM over an atoll.
The SIFT algo does not seem to be abel to automatically find enough homologous points in my images.
As this git issue is directly linked to what i am facing now, I would like to know if it was possible to select those comon points "by hand", and give them to CARS ?
To sum up, I would like to skip this SIFT step and give CARS a homologous points file.
Thank you very much for your help.
The homologous point detection function is set up to process 12-bit images.
Lower the peak threshold value allows to to find more points:
"applications": {
"sparse_matching": {
"method": "sift",
" sift_peak_threshold": 1.0
}
},
We will add the information in the FAQ or have CARS automatically override this value if you have 8-bit images.
David