Forum

Author Topic: matrix invert: singular matrix  (Read 4890 times)

andyroo

  • Sr. Member
  • ****
  • Posts: 441
    • View Profile
matrix invert: singular matrix
« on: June 05, 2014, 10:06:24 AM »
I had something happen today (build 1847) that I never saw before.

I started with an older project that was divided in chunks. Merged the chunks and added more GCPs. saved project and exported markers. To get rid of duplicate images I opened an even older version without chunks or GCPs and imported markers and camera calibration then realigned (after making sure GCPs were marked on all images).

After realignment I trimmed all of the flyers and sinkers in my sparse point cloud, then did an optimization step. Instead of seeing the standard "bundle_adjust: xxxxx.." text I saw text that looked like this:

"matrix_invert: singular matrix
xxmatrix_invert: singular matrix.."

etc until bundle adjust was complete. That was weird. So I looked at my biggest GCP offset, which didn't seem too bad, and edited a few points, then did another bundle adjust. That one looked normal. But what the heck is "matrix invert: singular matrix" ?

relevant logfile text follows (from original bundle adjust and bundle adjust #2):

Code: [Select]
Optimizing point cloud...
weights: 35.9691 cameras, 71938.1 markers, 359691 scalebars, 40 projections
bundle_adjust: matrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xxmatrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xxmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xxmatrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xxxxmatrix_invert: singular matrix
matrix_invert: singular matrix
xxmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
xxxxmatrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xxmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xxmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xxmatrix_invert: singular matrix
matrix_invert: singular matrix
xxmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
xmatrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
xxxxxmatrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
matrix_invert: singular matrix
xxx 50.0073 -> 1.24502
finished SBA in 303.487 seconds
Finished processing in 304.394 sec (exit code 1)
disabled 2 points
Optimizing point cloud...
weights: 35.9691 cameras, 71938.1 markers, 359691 scalebars, 40 projections
bundle_adjust: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1.26989 -> 1.21925
finished SBA in 389.478 seconds

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14968
    • View Profile
Re: matrix invert: singular matrix
« Reply #1 on: June 06, 2014, 12:58:29 PM »
Hello Andy,

Such behavior might be caused by the presence of the photos with too few (or even no) valid tie points on them. They can appear after manual tie point removal from sparse cloud, for example, using gradual selection tools.
So I can recommend to sort the cameras in the Ground Control pane using Projections column and to reset alignment for those with too few projections compared to others (usually t could be a few tens of points).
Best regards,
Alexey Pasumansky,
Agisoft LLC