Connected component command line error

Any question about the main GUI application (frontend)
Post Reply
Michael123
Posts: 13
Joined: Wed Aug 26, 2020 1:51 pm

Connected component command line error

Post by Michael123 »

Hello,

In the context of a command line calculation, two point clouds (importCloudF2 and importReferenceCloud, from Agisoft Metashape) will be compared with M3C2. Subsequently, one point cloud will be filtered based on the M3C2 value. The filtered point cloud (EXPORTCLOUD_M3C2filtered1) is intended to be divided into connected components. Here are my commands:

Code: Select all

CloudCompare -SILENT \
-AUTO_SAVE OFF \
-O -GLOBAL_SHIFT ${globalShiftx} ${globalShifty} ${globalShiftz} ${importCloudF2} \
-SET_ACTIVE_SF 5 \
-FILTER_SF $confidenceCompareCloud 255 \
-O -GLOBAL_SHIFT ${globalShiftx} ${globalShifty} 0 ${importReferenceCloud} \
-CROP2D Z ${row_count} ${vertices} \
-M3C2 ${M3C2PARA} \
-POP_CLOUDS \
-C_EXPORT_FMT ASC -ADD_HEADER \
-SAVE_CLOUDS FILE ${EXPORTCLOUD1}.txt \
-SET_ACTIVE_SF 5 \
-FILTER_SF MIN -$M3C2Value \
-C_EXPORT_FMT ASC -ADD_HEADER \
-SAVE_CLOUDS FILE ${EXPORTCLOUD_M3C2filtered1} \
-EXTRACT_CC 9 98 \
-C_EXPORT_FMT ASC -ADD_HEADER \
-SAVE_CLOUDS ALL_AT_ONCE FILE ${EXPORTCLOUD_components}
I'm working here with quite a few variables, but I believe the basic procedure will become apparent.
The following error message appears, and the connected component command is not executed:
CloudCompare: /mnt/Daten/software/cloudcompare/cloudcompare-v2.12.4/libs/qCC_db/include/ccScalarField.h:66: void ccScalarField::Range::setBounds(ScalarType, ScalarType, bool): Assertion `minVal <=maxVal' failed.
/var/spool/slurmd/job62900/slurm_script: line 231: 182826 Aborted (core dumped)
When I apply "-EXTRACT_CC 9 98" via command line, the error occurs.
When I apply "-EXTRACT_CC 1 2" via command line, the operation completes, but only one component is generated as an empty text file. However, when I manually load the point cloud EXPORTCLOUD_M3C2filtered1 into CloudCompare and apply EXTRACT_CC with 9 98, I get the desired result. The strange thing is that the process works in command line mode when I let importCloudF2 generate with higher accuracy values in Metashape, even though the resulting point cloud EXPORTCLOUD_M3C2filtered1 looks similar as the one with lower accuracy settings, just with a few more points. In both cases, the point cloud to which the command is applied has the necessary minimum number of points to produce a result. So, how should the error message be interpreted?

I really hope someone can help me. I'm getting a bit desperate...

Best regards,
Michael
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Connected component command line error

Post by daniel »

Oops, it seems I missed this message. And it looks tough to understand, so it may take some time before I'm able to process it...
Daniel, CloudCompare admin
Michael123
Posts: 13
Joined: Wed Aug 26, 2020 1:51 pm

Re: Connected component command line error

Post by Michael123 »

Hi Daniel,

I was able to simplify the script to a state where I try to use LCC on two different files which result from the same postprocessing method. It works on the one file, using it on the other file shows the same error message that I already mentioned. The structure of both PC seem to be identical, the only difference is the point number. My code:

Code: Select all

echo 'setting global shift'
globalShiftx=-639000
echo 'globalShiftx:' $globalShiftx
globalShifty=-5510000
echo 'globalShifty:' $globalShifty
globalShiftz=0
echo 'globalShiftz:' $globalShiftz



pcOptimized1=MP2_DM4_KP0_TP0_grad-0.1-10-2-10_crop2d_conf5-255_M3C2-params_CorePtsPc1_D0,2_H2,5_MIN_-0.25.txt
pcOptimized2=MP2_DM2_KP0_TP0_grad-0.1-10-2-10_crop2d_conf5-255_M3C2-params_CorePtsPc1_D0,2_H2,5_MIN_-0.25.txt
OctreeLevel=9
minPointNumber=89

echo -e "\n*** run CloudCompare"

#xvfb-run \
QT_QPA_PLATFORM=offscreen \
CloudCompare -SILENT \
-AUTO_SAVE OFF \
-O -GLOBAL_SHIFT ${globalShiftx} ${globalShifty} ${globalShiftz} ${pcOptimized2} \
-EXTRACT_CC $OctreeLevel $minPointNumber \
-SF_ADD_CONST CDT 99 \
-C_EXPORT_FMT ASC -ADD_HEADER \
-SAVE_CLOUDS ALL_AT_ONCE FILE export.txt \
-REMOVE_ALL_SFS \
-MERGE_CLOUDS \
-C_EXPORT_FMT ASC -ADD_HEADER \
-SAVE_CLOUDS FILE export_merged.txt \
-CLEAR_CLOUDS  

I can send you both PC if you want to reproduce the error.

Best regards
Michael
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Connected component command line error

Post by daniel »

Yes, that would help a lot! Thanks.
Daniel, CloudCompare admin
Michael123
Posts: 13
Joined: Wed Aug 26, 2020 1:51 pm

Re: Connected component command line error

Post by Michael123 »

Thank you Daniel, I sent you the files.
Michael123
Posts: 13
Joined: Wed Aug 26, 2020 1:51 pm

Re: Connected component command line error

Post by Michael123 »

To continue the post:

Daniel and I tested the LCC run with the previous settings using CC on Windows (version 2.13.1), and the components were generated without any error messages. I performed a software update to version 2.13.1 on our Linux cluster, but the error message persists.

Unfortunately, the issue has not been resolved. I suspect that the error is related to the different point cloud densities of the previously compared point clouds. In another case, when I encountered the error message, I densified a very sparse point cloud (delaunay mesh generation -> sample points on mesh), and afterwards, the run also worked on Linux. What surprises me is that it works with the sparse point cloud on Windows, but the error message appears on Linux.
Post Reply