How to add camera model

1,638 views
Skip to first unread message

tsch...@gmail.com

unread,
Aug 10, 2018, 10:45:17 AM8/10/18
to AliceVision
Hello,

I'm testing the windows build 2018.1.0 The CameraInit Node is telling me that I should add a camera model:
[error] Please add camera model(s) and sensor width(s) in the database.

How does this work? I'm using a RaspberryPi camera v2:

Cheers
Timo

Simone Gasparini

unread,
Aug 10, 2018, 10:59:40 AM8/10/18
to tsch...@gmail.com, alice...@googlegroups.com
Hi Timo,

depending on your settings (using binaries or bravely building from scratch) you should have a file named `cameraSensors.db`. (originally it is in AliceVision, https://github.com/alicevision/AliceVision/tree/develop/src/aliceVision/sensorDB)
Despite the extension, it is just a plain text (csv) containing the information of different cameras/devices.
The format is (semicolon is the separator):
```
camera brand;camera model;sensorWidth_mm
```
According to your specs, the sensor width of RaspberryPi camera is 3.76 mm.
Now, do  RaspberryPi camera v2 write any EXIF in the images? You should check a few lines before the error message if the EXIF contains the information about the camera. Usually, you can have something like
```
[21:11:02.214411][error] image: 'MVIMG_20180809_200420.jpg'
camera brand: Google
camera model: Pixel XL
[21:11:02.214411][error] Please add camera model(s) and sensor width(s) in the database.
```
So brand and model are important as they need to be put in the database.

If `Brand` and `Model`, show up you just need to add the following line to your file using your preferred text editor (vim, emacs, sublime, atom, notepad, notepad++ whatever...)
```
Brand;Model;6.25
```
possibly in alphabetical order.

S.

--
You received this message because you are subscribed to the Google Groups "AliceVision" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alicevision...@googlegroups.com.
Visit this group at https://groups.google.com/group/alicevision.
To view this discussion on the web visit https://groups.google.com/d/msgid/alicevision/1df0cb5d-0d5a-4b3e-bfff-fc5f2dad75ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tsch...@gmail.com

unread,
Aug 10, 2018, 3:53:06 PM8/10/18
to AliceVision
Hi Simone,

thanks for your fast response. I was able to add my camera to the 'cameraSensons.db'. Now the CameraInit Node is fine. But I'm a bit lost with the other nodes. Some attributes are clear and the tooltips are fine, but for some attributes I need some more input/knowledge. For example what is the difference between the 'Describer Types' inside the FeatureExtraction-Node. I know that this node looks for 2D features for each image separately. Is it possible to show these features in the interface?
The same applies to the FeatureMatching-Node, is it possible to show the connections?

In the 3D Viewer I would like to have an attribute to control the point size.

My dataset is still computing, but so far Meshroom looks very nice.

Will there be compiled versions of the Maya and Nuke Plugin?

Cheers
Timo

Simone Gasparini

unread,
Aug 10, 2018, 4:23:03 PM8/10/18
to Timo Schnitt, alice...@googlegroups.com
On Fri, Aug 10, 2018 at 9:53 PM <tsch...@gmail.com> wrote:
Hi Simone,

thanks for your fast response. I was able to add my camera to the 'cameraSensons.db'. Now the CameraInit Node is fine. But I'm a bit lost with the other nodes. Some attributes are clear and the tooltips are fine, but for some attributes I need some more input/knowledge. For example what is the difference between the 'Describer Types' inside the FeatureExtraction-Node.

The type of features that are used. Each feature has its own characteristics, let's say that for most cases SIFT is enough, AKAZE should be able to be more robust to skew angles between views thus improving the matching process. SIFT_OCV is just a different implementation of SIFT from opencv.
 
I know that this node looks for 2D features for each image separately. Is it possible to show these features in the interface?
The same applies to the FeatureMatching-Node, is it possible to show the connections?

Not at the moment, this kind of visual debugging can be done with MeshroomMaya
I don't know if it is in sync with the last AliceVision changes, for sure there are no binaries yet for that
 

In the 3D Viewer I would like to have an attribute to control the point size.

That's a good remark, feel free to open an issue on github and if possible it will take care of.
 

My dataset is still computing, but so far Meshroom looks very nice.

Will there be compiled versions of the Maya and Nuke Plugin?

This I am no able to answer, I think "ideally yes" especially now that there are binaries for AliceVision. Fabien and Yann will give you a more precise answer :-)

S.
 

Nicolaj Johansen

unread,
Nov 6, 2022, 10:50:49 AM11/6/22
to AliceVision
Hello

I'm a student from Denmark that is doing a project on photogrammetry and want to automate it. I found this guide which I'm following:
http://filmicworlds.com/blog/command-line-photogrammetry-with-alicevision/ 

And now I have run into the same problem. I'm trying to add the Raspberry PI RP_imx219 camera to the database. I have tried searching the width, calculating, and just brute force it from 0 to 100 where it is increasing by 0.01 each time. The error message is always the same.

My error message is:

[16:34:49.492585][error] Sensor width doesn't exist in the database for image(s) :
[16:34:49.493585][error] image: '0003.jpg'
        - camera brand: RaspberryPi
        - camera model: RP_imx219

[16:34:49.494585][error] Please add camera model(s) and sensor width(s) in the database.

My cameraSensors.db have this:

PtGrey;PtGrey Grasshopper3 1920x1440;6.73
PtGrey;PtGrey Grasshopper3 2048x1536;7.18
RaspberryPi;RP_imx219;3.674;
Red;Epic Dragon;30.7
Red;Red Dragon 4K HD;19.19

Does any of you know what I should write in the database?

Best regards
Nicolaj


Simone Gasparini

unread,
Nov 6, 2022, 11:18:39 AM11/6/22
to Nicolaj Johansen, AliceVision
Which version of Meshroom are you using? (official release, built by yourself from develop etc)
Normally that camera is already in the db:

Also be sure that the db file you are using in Meshroom is the same you are editing if it is the case.

S.

Nicolaj Johansen

unread,
Nov 7, 2022, 4:28:59 PM11/7/22
to AliceVision
Hello Simone

Thanks a lot for answering.
I have looked a little more at it and also updated the version. I was using 2018 before mostly just because the guide linked to it. Now I use 2021 and indeed the raspberry cam is in the database now. 

I don't know how much you know about Meshroom in command line. or if it's even any different. But I get the same Error message as before although I get a little further in the process. 

Now it stops around 04_structurefrommotion or 07_Depthmap. From 04 it stopped making files in the directories and in the cmd window it said it was working on 07 when it stopped.

The pictures I'm using can make a model manually in the program so they are good enough. I just don't understand what the problem is when I automate it. Is there any chance you know anything about it?

Best regards
Nicolaj Johansen

Simone Gasparini

unread,
Nov 7, 2022, 5:32:20 PM11/7/22
to Nicolaj Johansen, AliceVision


I don't know how much you know about Meshroom in command line. or if it's even any different. But I get the same Error message as before although I get a little further in the process. 


What does the error message say?
Are you embedding EXIF metadata information in your images? In order for the whole process to work the images should contain the information about the Maker and the model in the EXIF. If you are using a camera connected to the Raspberry it is like a webcam, the frame you grab has no exif information. That's why I'm asking just to make sure.

S.

 

Nicolaj Johansen

unread,
Nov 7, 2022, 7:37:03 PM11/7/22
to AliceVision
I changed the pictures so the camera is different but it's still a raspberry pi camera and I can see it in the database.
First, i get this: 

[01:24:39.752096][warning] Some image(s) have no serial number to identify the camera/lens device.
This makes it impossible to correctly group the images by device if you have used multiple identical (same model) camera devices.
The reconstruction will assume that only one device has been used, so if 2 images share the same focal length approximation they will share the same internal camera parameters.
97 image(s) are concerned.
[01:24:39.754098][warning] Sensor width doesn't exist in the database for image(s):
        - camera brand: RaspberryPi
        - camera model: RP_ov5647
           - image: img_1666784799.793436.jpg

Please add camera model(s) and sensor width(s) in the database.
[01:24:39.804596][info] CameraInit report:
        - # views listed: 97
           - # views with an initialized intrinsic listed: 97
           - # views without metadata (with a default intrinsic): 0
        - # intrinsics listed: 1

But it keeps going. 

It does feature extraction(01), ImageMatching(02) and Feature matching(03).



When it tries to do Structure from motion(04) I get this:

[01:30:31.763047][error] Can't find the given initial pair view: --initialPairB
[01:30:31.763549][error] Could not find corresponding view in the initial pair: --initialPairB



On Prepare Dense Scene(05):
 
[01:30:32.116547][fatal] G:\3_semester_projekt_v2\Intimediary files/04_StructureFromMotion/bundle.sfm: cannot open file
G:\3_semester_projekt_v2\Meshroom-2021.1.0\aliceVision\bin\aliceVision_cameraConnection.exe --verboseLevel info --ini "G:\3_semester_projekt_v2\Intimediary files/05_PrepareDenseScene/mvs.ini"
'G:\3_semester_projekt_v2\Meshroom-2021.1.0\aliceVision\bin\aliceVision_cameraConnection.exe' is not recognized as an internal or external command,
operable program or batch file.



After that when it tries to generate depth map it looks like it writes this out for every picture:

DepthMap Group 13/33: 39, 3
G:\3_semester_projekt_v2\Meshroom-2021.1.0\aliceVision\bin\aliceVision_depthMapEstimation.exe --sgmGammaC 5.5 --sgmWSH 4 --refineGammaP 8.0 --refineSigma 15 --refineNSamplesHalf 150 --sgmMaxTCams 10 --refineWSH 3 --downscale 2 --refineMaxTCams 6 --verboseLevel info --refineGammaC 15.5 --sgmGammaP 8.0 --refineNiters 100 --refineNDepthsToRefine 31 --refineUseTcOrRcPixSize False --ini "G:\3_semester_projekt_v2\Intimediary files/05_PrepareDenseScene/mvs.ini" --output "G:\3_semester_projekt_v2\Intimediary files/07_DepthMap" --rangeStart 39 --rangeSize 3
ERROR: unrecognised option '--ini'

Usage:

AliceVision depthMapEstimation
Estimate depth map for each input image:

Required parameters:
  -i [ --input ] arg                    SfMData file.
  --imagesFolder arg                    Images folder. Filename should be the
                                        image uid.
  -o [ --output ] arg                   Output folder for generated depth maps.

Optional parameters:
  --rangeStart arg (=-1)                Compute a sub-range of images from
                                        index rangeStart to rangeStart+rangeSiz
                                        e.
  --rangeSize arg (=-1)                 Compute a sub-range of N images
                                        (N=rangeSize).
  --downscale arg (=2)                  Image downscale factor.
  --minViewAngle arg (=2)               minimum angle between two views.
  --maxViewAngle arg (=70)              maximum angle between two views.
  --sgmMaxTCams arg (=10)               Semi Global Matching: Number of
                                        neighbour cameras.
  --sgmWSH arg (=4)                     Semi Global Matching: Size of the patch
                                        used to compute the similarity.
  --sgmGammaC arg (=5.5)                Semi Global Matching: GammaC threshold.
  --sgmGammaP arg (=8)                  Semi Global Matching: GammaP threshold.
  --refineMaxTCams arg (=6)             Refine: Number of neighbour cameras.
  --refineNSamplesHalf arg (=150)       Refine: Number of samples.
  --refineNDepthsToRefine arg (=31)     Refine: Number of depths.
  --refineNiters arg (=100)             Refine: Number of iterations.
  --refineWSH arg (=3)                  Refine: Size of the patch used to
                                        compute the similarity.
  --refineSigma arg (=15)               Refine: Sigma threshold.
  --refineGammaC arg (=15.5)            Refine: GammaC threshold.
  --refineGammaP arg (=8)               Refine: GammaP threshold.
  --refineUseTcOrRcPixSize arg (=0)     Refine: Use current camera pixel size
                                        or minimum pixel size of neighbour
                                        cameras.
  --exportIntermediateResults arg (=0)  Export intermediate results from the
                                        SGM and Refine steps.
  --nbGPUs arg (=0)                     Number of GPUs to use (0 means use all
                                        GPUs).

Log parameters:
  -v [ --verboseLevel ] arg (=info)     verbosity level (fatal, error, warning,
                                        info, debug, trace).




after that, it just stops. And it hasn't generated any files from structure from motion(04) and onwards.

Nicolaj Johansen

unread,
Nov 8, 2022, 4:28:56 PM11/8/22
to AliceVision
I'm not currently doing anything with metadata. Not actively anyway But the pictures work manually in Meshroom without warnings. Also, i can see the brand and model in the metadata of the pictures

mandag den 7. november 2022 kl. 23.32.20 UTC+1 skrev simone.g...@gmail.com:
Reply all
Reply to author
Forward
0 new messages