You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, it is not straightforward to add non-central camera models, which I assume would be the case for the type of data you mention. There is a chance that I'll release code for it at some point in the future, but it is not clear when.
If this answers your question, I would close the issue for now. Otherwise, feel free to follow up.
Thanks for reply. Camera rig would be non-central, but panorama is central. Different with conventional rectilinear camera model, there is no front or back (no cherilty check) in the panorama camera and the pixel based mapping function would be large distorted, Maybe bearing vector is better representation for this case.
The reprojection error could be chord distance between two rays~
Thanks for the clarification. This makes sense and should be possible with some modification of the current implementation. XY image coordinates would then simply be your azimuth and elevation angles. One important thing that would have to be adapted are the carefully chosen pixel error thresholds. Let me know if you want to tackle this problem and you have questions. Happy to help.
@daleydeng The results look much better now! Would you be willing to prepare a pull request against the current master branch? I am happy to incorporate your changes.
the Spherical camera itself defines how the world coordinate(Vector3d, u, v, w) to the image coordinate(Vector2d, x, y)
Normalization has been done in camera itself by caluclating the panning and tilting angle from pixel
There is no change in feature extraction, they are just orignal 2D feature image coordinates.
template
void SphericalCentralCameraModel::WorldToImage(const T* params, T u,
T v, T w, T* x, T* y) {
const T f = params[0];
const T c1 = params[1];
const T c2 = params[2];
T l = ceres::sqrt(u * u + v * v + w * w);
u = u/l, v = v/l, w = w/l;
T p = ceres::atan2(u, w), t = -ceres::asin(v);
_x = p_f+ c1;
_y = -t_f + c2;
}
template
void SphericalCentralCameraModel::ImageToWorld(const T* params, const T x,
const T y, T* u, T* v, T *w) {
const T f = params[0];
const T c1 = params[1];
const T c2 = params[2];
auto p = (x - c1) / f, t = -(y - c2) / f;
auto cos_t = ceres::cos(t);
*u = cos_t * ceres::sin(p);
*v = -ceres::sin(t);
*w = cos_t * ceres::cos(p);
}
Focal length is the radius of camera sphere in pixel units.
Principle point lies on the equator of the sphere.
For equirectangular projection, each pixel represents same delta panning and tilting angle which is 1/focal, and the image width's angle is
image width / focal = 2*pi
Bassically:
For P3P, EPNP, Triangulation, Essential Matrix, there exists general solution to deal with Vector3D world point, without regarding different types of world point [u/w, v/w, 1] or [u, v, w]
For 7pt Fundamental, 8pt Fundamental, Homography matrix estimation, only 2D image point is supported.
Sampson error need to adapted to Vector3D world point and Vector 2D image point for both Essential and Fundamental matrix estimation
For pixel based reprojection error, no need to change.
x, y axises in image plane are parallel to u, v axises in spherical coordinate system, v axis is downward
In spherical coordinate system, pan angle pivot with v axis while tilt angle pivot with u axis.
you would have to clone @daleydeng branch and compile it yourself. The rest should be equivalent to the standard procedure, see documentation/tutorial.
I decide to go throw the command line tutorial and got an error too. I am really sorry, but I have to post here because issues are not opened in @daleydeng repo.
Nothing. This should be ignored and is caused by Qt and not by COLMAP. As long as COLMAP exits without an error, everything should be fine. Let me know if that answers your question.
@ahojnnes : Thank you ! So in that case that should means that I missed a step to make clomp working with my Ricoh Dataset or that my dataset is not good enough. I will generate a new one tomorrow!
@stephane-lb, you could check the differences with the orignal branch, the ray based modifications are there, you could also check them~. And I'm busy too and havent update for a while~~
I tried to check @daleydeng's branch (cvai) and see if it works with the latest master branch. One important unit test (TestRefineEssentialMatrix) failed with following big value difference.
7/43 Testing: base/essential_matrix_utils_test
7/43 Test: base/essential_matrix_utils_test
Command: "/home/colmap.pano/build/src/base/essential_matrix_utils_test"
Directory: /home/colmap.pano/build/src/base
"base/essential_matrix_utils_test" start time: Sep 29 12:26 UTC
Output:
----------------------------------------------------------
Running 6 test cases...
/home/colmap.pano/src/base/essential_matrix_test.cc(179):
error in "TestRefineEssentialMatrix": check (E - E_refined).norm() <= (E - E_pertubated).norm() failed [2.8186349886258166 > 0.039204384018772402]
Does anyone have the same problem? The test environment is:
Ubuntu 16.04
Three GeForce GTX 1080 Nvidia cards with CUDA 8.0 (driver 384.69)
Hi all,
Can anyone please confirm if the current cvai branch is funcional with equirectangulars? Having some trouble to get Spherical Camera model type to appear on GUI.
Thank you
@franmts I have no problem to get the new camera model in GUI. I can confirm that both GUI and command line modes work with the new camera mode. But as said, the reconstruction result is not plausible. The unit test failed on "essential_matrix_test".
@yuyou and @daleydeng , do you have windows binaries for this branch? Would be great if you could share that here or on [email protected] to try it out. I'm looking to benchmark this against pix4d and agisoft. Counting on ceres solver to see great alignment on various image resolutions.
Yes, I tested @ryanismert. Compiled after much effort, but I guess I was missing computer horse power to run it, even for smaller dimensions. Software constantly crashed and couldn't proceed.
Activity
ahojnnes commentedon May 1, 2016
Hi @daleydeng,
For now, it is not straightforward to add non-central camera models, which I assume would be the case for the type of data you mention. There is a chance that I'll release code for it at some point in the future, but it is not clear when.
If this answers your question, I would close the issue for now. Otherwise, feel free to follow up.
Cheers, Johannes
daleydeng commentedon May 1, 2016
Thanks for reply. Camera rig would be non-central, but panorama is central. Different with conventional rectilinear camera model, there is no front or back (no cherilty check) in the panorama camera and the pixel based mapping function would be large distorted, Maybe bearing vector is better representation for this case.
The reprojection error could be chord distance between two rays~
Check http://laurentkneip.github.io/opengv/page_how_to_use.html#sec_vocabulary for more details~
PS: Bearing vector is general enough for all the calibrated central cameras including rectilinear one~
ahojnnes commentedon May 1, 2016
Hi,
Thanks for the clarification. This makes sense and should be possible with some modification of the current implementation. XY image coordinates would then simply be your azimuth and elevation angles. One important thing that would have to be adapted are the carefully chosen pixel error thresholds. Let me know if you want to tackle this problem and you have questions. Happy to help.
Best,
Johannes
daleydeng commentedon May 1, 2016
All right, I will contact you when I tackle this problem~~
daleydeng commentedon May 10, 2016
I have added support for generic central camera (such as spherical camera) as
https://github.com/daleydeng/colmap/tree/cvai, @ahojnnes could ref it when needed!
ahojnnes commentedon May 10, 2016
@daleydeng Hi, this looks great. Would you have a test dataset to share to test the functionality? Thanks!
daleydeng commentedon May 10, 2016
@ahojnnes , Hi, I've added data in there, check it out~, but there is a little bug when running about 160 images, I'm figuring it out~
ahojnnes commentedon May 10, 2016
@daleydeng Uploaded the new trees here: http://people.inf.ethz.ch/jschoenb/colmap/vocabulary-trees/development-version/. The new retrieval should work a lot better than what I had previously!
daleydeng commentedon May 10, 2016
Ok~
daleydeng commentedon May 10, 2016
I think I saw the problem, refine_focal_length should be disabled in spherical case, change *refine_focal_length to false in proj.ini
daleydeng commentedon May 10, 2016
@ahojnnes Check the new result, now we need a sphere entity in gl viewer for each spherical camera~
ahojnnes commentedon May 10, 2016
@daleydeng The results look much better now! Would you be willing to prepare a pull request against the current master branch? I am happy to incorporate your changes.
ahojnnes commentedon May 10, 2016
For my understanding, did you do normal feature extraction or how did you translate from x,y to spherical coordinates?
daleydeng commentedon May 10, 2016
the Spherical camera itself defines how the world coordinate(Vector3d, u, v, w) to the image coordinate(Vector2d, x, y)
Normalization has been done in camera itself by caluclating the panning and tilting angle from pixel
There is no change in feature extraction, they are just orignal 2D feature image coordinates.
template
void SphericalCentralCameraModel::WorldToImage(const T* params, T u,
T v, T w, T* x, T* y) {
const T f = params[0];
const T c1 = params[1];
const T c2 = params[2];
T l = ceres::sqrt(u * u + v * v + w * w);
u = u/l, v = v/l, w = w/l;
T p = ceres::atan2(u, w), t = -ceres::asin(v);
_x = p_f+ c1;
_y = -t_f + c2;
}
template
void SphericalCentralCameraModel::ImageToWorld(const T* params, const T x,
const T y, T* u, T* v, T *w) {
const T f = params[0];
const T c1 = params[1];
const T c2 = params[2];
auto p = (x - c1) / f, t = -(y - c2) / f;
auto cos_t = ceres::cos(t);
*u = cos_t * ceres::sin(p);
*v = -ceres::sin(t);
*w = cos_t * ceres::cos(p);
}
Focal length is the radius of camera sphere in pixel units.
Principle point lies on the equator of the sphere.
For equirectangular projection, each pixel represents same delta panning and tilting angle which is 1/focal, and the image width's angle is
image width / focal = 2*pi
Bassically:
For P3P, EPNP, Triangulation, Essential Matrix, there exists general solution to deal with Vector3D world point, without regarding different types of world point [u/w, v/w, 1] or [u, v, w]
For 7pt Fundamental, 8pt Fundamental, Homography matrix estimation, only 2D image point is supported.
Sampson error need to adapted to Vector3D world point and Vector 2D image point for both Essential and Fundamental matrix estimation
For pixel based reprojection error, no need to change.
x, y axises in image plane are parallel to u, v axises in spherical coordinate system, v axis is downward
In spherical coordinate system, pan angle pivot with v axis while tilt angle pivot with u axis.
Maybe this helps
http://mathworld.wolfram.com/CylindricalEquidistantProjection.html
http://paulbourke.net/geometry/transformationprojection/
PS: Maybe there is no need normalization in cost_function.h, I'll update it
daleydeng commentedon May 10, 2016
@ahojnnes OK, let me cleanup my code for some name conventions and something for pull request, and after that, Cylindrical Camera could also be added~
PS: How to deal with the data, upload somewhere?
13 remaining items
ahojnnes commentedon Aug 23, 2016
Hi Stephane,
you would have to clone @daleydeng branch and compile it yourself. The rest should be equivalent to the standard procedure, see documentation/tutorial.
Best,
Johannes
stephane-lb commentedon Aug 24, 2016
Hi @ahojnnes ,
I tried too do that :
And now I don't know what I should select here :

If you could suggest something to me, it would be great.
Thanks for your help,
Stephane
stephane-lb commentedon Sep 2, 2016
Hi,
I decide to go throw the command line tutorial and got an error too. I am really sorry, but I have to post here because issues are not opened in @daleydeng repo.
So this is what I have done :
And this is what I got :
What did I make wrong ?
Cheers,
Stéphane
ahojnnes commentedon Sep 2, 2016
Nothing. This should be ignored and is caused by Qt and not by COLMAP. As long as COLMAP exits without an error, everything should be fine. Let me know if that answers your question.
stephane-lb commentedon Sep 2, 2016
@ahojnnes : Thank you ! So in that case that should means that I missed a step to make clomp working with my Ricoh Dataset or that my dataset is not good enough. I will generate a new one tomorrow!
daleydeng commentedon Sep 5, 2016
@stephane-lb, you could check the differences with the orignal branch, the ray based modifications are there, you could also check them~. And I'm busy too and havent update for a while~~
yuyou commentedon Sep 29, 2017
Hi
I tried to check @daleydeng's branch (cvai) and see if it works with the latest master branch. One important unit test (TestRefineEssentialMatrix) failed with following big value difference.
Does anyone have the same problem? The test environment is:
franmts commentedon Oct 24, 2017
Hi all,
Can anyone please confirm if the current cvai branch is funcional with equirectangulars? Having some trouble to get Spherical Camera model type to appear on GUI.
Thank you
ahojnnes commentedon Oct 24, 2017
@franmts I have not tried it but if the camera model does not appear in the GUI, it is probably not defined here: https://github.com/colmap/colmap/blob/master/src/base/camera_models.h#L103
yuyou commentedon Oct 24, 2017
@franmts I have no problem to get the new camera model in GUI. I can confirm that both GUI and command line modes work with the new camera mode. But as said, the reconstruction result is not plausible. The unit test failed on "essential_matrix_test".
ahojnnes commentedon Oct 24, 2017
@yuyou The
TestRefineEssentialMatrixshould not have an impact on the reconstruction, you can ignore it.franmts commentedon Oct 26, 2017
@yuyou and @daleydeng , do you have windows binaries for this branch? Would be great if you could share that here or on [email protected] to try it out. I'm looking to benchmark this against pix4d and agisoft. Counting on ceres solver to see great alignment on various image resolutions.
ryanismert commentedon May 10, 2018
@franmts Did you have any luck testing this?
franmts commentedon May 10, 2018
Yes, I tested @ryanismert. Compiled after much effort, but I guess I was missing computer horse power to run it, even for smaller dimensions. Software constantly crashed and couldn't proceed.