Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconstruction fails: "Sensor width doesn't exist in the database" #179

Closed
steren opened this issue Aug 10, 2018 · 94 comments
Closed

Reconstruction fails: "Sensor width doesn't exist in the database" #179

steren opened this issue Aug 10, 2018 · 94 comments
Labels
bug for actual bugs (unsure? use type:question) scope:AliceVision concerning alicevision library type:question

Comments

@steren
Copy link

steren commented Aug 10, 2018

I get this error at the CameraInit step:

[21:11:02.213413][error] Sensor width doesn't exist in the database for image(s) :
[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.

Do you know how I can add to the database?

@simogasp
Copy link
Member

According to your settings (using binaries or bravely building from scratch) you should have a file named cameraSensors.db.
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 this
https://www.devicespecifications.com/en/model/a95e3ed6
the Google Pixel XL sensor width is 6.25mm

So you just need to add the following line to your file using your preferred text editor (vim, emacs, sublime, atom, notepad, notepad++ whatever...)

Google;Google Pixel XL;6.25

possibly in alphabetical order, so after the line GE;GE X600;6.16.

@steren
Copy link
Author

steren commented Aug 10, 2018

Thanks.
Is there a way to add this data to the file itself distributed with Meshroom so that the next users do not have to do this manually?
I could not find this file on GitHub

@simogasp
Copy link
Member

It's in AliceVision
https://github.com/alicevision/AliceVision/tree/develop/src/aliceVision/sensorDB

I will update the file with your sensor (BTW did it work?). To date, the only way to keep it updated is for people to pull request the values of missing devices.
It would be nice to have a script that periodically harvests websites like
https://www.digicamdb.com/
or
https://www.devicespecifications.com/en
where all info are stored.

@steren
Copy link
Author

steren commented Aug 10, 2018 via email

@simogasp
Copy link
Member

What's the name on your version?
It has been renamed in the rush for generating the binaries and maybe there is an incongruence.

@steren
Copy link
Author

steren commented Aug 10, 2018 via email

@steren
Copy link
Author

steren commented Aug 11, 2018

It worked like a charm with this value. (see model)

@Sarngond
Copy link

I got this same error but my camera is in the db file. I don't know how to fix this. This is my error:

[23:12:08.278957][error] Sensor width doesn't exist in the database for image(s) :
[23:12:08.281958][error] image: 'DSC02752.JPG'
- camera brand: SONY
- camera model: DSC-HX7V

@simogasp
Copy link
Member

simogasp commented Aug 14, 2018

@Sarngond from this page
https://www.digicamdb.com/specs/sony_cybershot-dsc-hx7v/
the sensor width is 6.16 mm.
So add the following line to your cameraSensor.db

Sony;Sony DSC-HX7V;6.16

@Urdwex
Copy link

Urdwex commented Aug 14, 2018

Hi, I got the same error, the camera is already in the db file and I additionally added it to the db file.

[11:19:59.770947][error] Sensor width doesn't exist in the database for image(s) :
[11:19:59.771946][error] image: '14_05.jpg'
- camera brand: Canon
- camera model: Canon EOS 1200D

Canon;Canon EOS 1200D;22.3

@simogasp
Copy link
Member

did u add it just after Canon;Canon EOS 1000D;22.2?

@Urdwex
Copy link

Urdwex commented Aug 14, 2018

No, I added it between.

Canon;Canon EOS 1100D;22.2
Canon;Canon EOS 1300D;22.3

It doesn't work either when adding it after
Canon;Canon EOS 1000D;22.2

@Sarngond
Copy link

@simogasp
the line is already in the code. It looks like this though:
Sony;Sony Cybershot DSC HX60;6.16
Sony;Sony CyberShot DSC HX7V;6.16
Sony;Sony CyberShot DSC HX9V;6.16

@simogasp
Copy link
Member

@Sarngond sorry i read your message too quickly... I guess you need to add that '-' so that the line reads

Sony;Sony CyberShot DSC-HX7V;6.16

The comparisons are case insensitive but they are not smart enough to catch these subtle variations and it really depends on each model what is written in the EXIF.

@simogasp
Copy link
Member

simogasp commented Aug 14, 2018

@Urdwex I tested on AliceVision and it works fine for me with that line. Can you share just one image taken with that camera so I can test it?

@Sarngond
Copy link

Sarngond commented Aug 14, 2018

@simogasp
dsc02707

@Sarngond
Copy link

Sarngond commented Aug 14, 2018

@simogasp
I added the ' - ' to where it looks like:
Sony;Sony Cybershot DSC HX60;6.16
Sony;Sony CyberShot DSC-HX7V;6.16
Sony;Sony CyberShot DSC HX9V;6.16
but it still doesn't work. Also, when you say Alicevision, you are including Meshroom right?

@peter-vasut
Copy link

peter-vasut commented Aug 14, 2018

Today I have downloaded Meshroom and I have problem with Sony DCS-HX9V. When I selected model number in Meshroom log window, I noticed bunch of spaces after model name. I inserted following line to model database:

SONY;DSC-HX9V               ;6.16

and it works. Seems like image attached above contains those spaces too. (I have also sorted lines using sort utility, just in case, but that alone won't help. I don't even know if it's necessary.)

@simogasp
Copy link
Member

@Sarngond i tried with your picture and the database with the dash ('-') and it works fine...
Meshroom uses AliceVision executables to run the pipeline, that's why I was talking about that.
Did u build meshroom and alicevision yourself or are u using the provided binary?

@simogasp
Copy link
Member

simogasp commented Aug 14, 2018

@peto2006 thanks for noticing that! @Sarngond while we try to find a solution to this problem you can try to modify the line with the spaces

Sony;Sony CyberShot DSC-HX7V               ;6.16

(I hope I inserted the exact numeber of spaces, anyway from your log you can select with the mouse the number of spaces and correct in case)

Just to have all the info, which system are you working on? Windows, Mac, linux, versions etc?

@Sarngond
Copy link

@simogasp
I am using Windows 10. I downloaded the Meshroom zip folder. Thanks for trying to figure out my problem!

@Sarngond
Copy link

@simogasp @peto2006
The space trick worked for me, thanks!

@Urdwex
Copy link

Urdwex commented Aug 15, 2018

@simogasp
x_04_

@simogasp
Copy link
Member

@Urdwex can you please check in the log if there are spaces after the model, ie

[11:19:59.770947][error] Sensor width doesn't exist in the database for image(s) :
[11:19:59.771946][error] image: '14_05.jpg'
- camera brand: Canon
- camera model: Canon EOS 1200D
                               ^^^^^ are there spaces after?

As you see from the discussion above that could be the issue. in that case u can add the spaces to the line (at least for now, while we investigate and figure out the issue).

@Urdwex
Copy link

Urdwex commented Aug 15, 2018

@simogasp there are no spaces after the model, but a whole line missing before the next log entry. Could this cause the error?

`[11:23:35.251994][error] image: 'X_20_.jpg'
- camera brand: Canon
- camera model: Canon EOS 1200D

[11:23:35.252992][error] Please add camera model(s) and sensor width(s) in the database.
`

@simogasp
Copy link
Member

no the empty line is always there (but we should maybe remove it from the code)
As a Hail Mary (today it's her holyday after all... :-) ) you can try this anyway

 Canon;Canon EOS 1200D              ;22.2

btw, in order to have all the info, are u using the provided binary or did you build it from scratch yourself? which OS and version?

@simogasp simogasp added bug for actual bugs (unsure? use type:question) scope:AliceVision concerning alicevision library labels Aug 15, 2018
@natowi
Copy link
Member

natowi commented Dec 16, 2018

@soichih As you can read in the previous posts, this is a common problem.
Some cameras use extra EXIF fields which cause an error when importing images to Meshroom. To fix this problem, strip all uncommon EXIF data and add Make and Model. Now the Meshroom import should work. You can use Exif tools like Exif Editor or ExifToolGUI.

@soichih
Copy link

soichih commented Dec 16, 2018

@natowi Thanks!

I did the following to remove exif data and meshroom seems to be running now.

$ sudo apt install exittool
$ for i in *.jpg; do echo "Processing $i"; exiftool -all= "$i"; done

I probably need to reset camera brand/model field, but I will see what happens without them.. ;(

UPDATE...

I can start meshroom process, but it got stuck on the first step.. I don't think it will work without brand/model info..

I've reset them with this.

for i in *.jpg; do echo "Processing $i"; exiftool -make=motorola -model="moto x4" "$i"; done

And I still have the entry in the cameraSensor.db

motorola;moto x4;4.0

But, now I am getting the previous error message I was getting.

[14:02:49.430676][error] Sensor width doesn't exist in the database for image(s) :
[14:02:49.430706][error] image: 'IMG_20181215_204028757.jpg'
	- camera brand: motorola
	- camera model: moto x4

@natowi
Copy link
Member

natowi commented Dec 17, 2018

@soichih you can attach a sample image, and I´ll take a look. This is the same problem tegbrookes had.

@soichih
Copy link

soichih commented Dec 17, 2018

@natowi

Here is one of my original image. It just a photo taken by my phone; Moto x4.

img_20181215_203852980

@natowi
Copy link
Member

natowi commented Dec 18, 2018

@soichih I just added your image to Meshroom using motorola;moto x4;4.0 and there are no problems at all.

@daniel321
Copy link

I am having the same problem with the galaxy j1 ace, but "https://www.devicespecifications.com/en/model/a30b3722" and "https://www.sammobile.com/devices/galaxy-j1-ace-ve/specs/SM-J111M/"
mention no "sensor size", any ideas ?

  • camera brand: samsung
  • camera model: SM-J111M

@simogasp
Copy link
Member

@daniel321 It's actually hard to find any information, even about the actual chip used.
We can only guess that is a Samsung camera and according to the image resolution (5MP 2592 x 1944) it may be the S5K4E6 1/4" from this table https://en.wikipedia.org/wiki/Samsung_CMOS
Being a 1/4" sensor you can try to use 3.60 as sensor width. (https://en.wikipedia.org/wiki/Image_sensor_format#Table_of_sensor_formats_and_sizes).
That could be an honest guess for the image width. Please try with that one and see the results. In case we can add it to the "official" database

@daniel321
Copy link

thanks, 3.60 seems to work reasonably well.

@JasonDalton
Copy link

The version of the database from the Zip download was well behind the latest in the src dir here: https://github.com/alicevision/AliceVision/blob/develop/src/aliceVision/sensorDB/cameraSensors.db
I found the line for my camera (Google Pixel 3) and added it to my local cameraSensors.db file, which worked fine.

@Razeu
Copy link

Razeu commented Jan 5, 2019

Here is the one for Huawei Nexus 6p
NB. no huawei in the camerasensor.db at all.

Huawei;Nexus 6P;6.25

@MatthewMiles0
Copy link

I cannot find the sensor size for the moto g6 play anywhere. please help
https://www.devicespecifications.com/en/model/08a34984
https://www.motorola.com/us/products/moto-g-play-gen-6

@natowi
Copy link
Member

natowi commented Jul 26, 2019

@MatthewIsAwesome Sometimes there are no released sensor details. Meshroom can estimate the needed values.

@MatthewMiles0
Copy link

@natowi how can I get it to estimate then? It's returning the above error at the moment

@natowi
Copy link
Member

natowi commented Jul 26, 2019

@MatthewIsAwesome remove model and make info from the metadata, import the image to Meshroom then hover over the yellow icon.
est

@MatthewMiles0
Copy link

@natowi thank you - it's working now!

@natowi
Copy link
Member

natowi commented Jul 26, 2019

@MatthewIsAwesome Can you share your estimated sensor width, so we can add it to the db?

@fitzmurphy
Copy link

I've just installed Meshroom and have run a few tests with my phone (Google Pixel 2) which seem to work just fine. I took some additional pictures with my Sony Cybershot HX9V and am getting the same error about needing to add the camera to cameraSensors.db. I've checked - and the camera is actually already IN cameraSensors.db (twice as a matter of fact). I also dumped the exif data for one of the images and there are no trailing spaces or any metadata related to the camera besides the following:

  • camera brand: SONY
  • camera model: DSC-HX9V

The exif dump shows the following:
MAKE : SONY
Camera Model Name: DSC-HX9V

Are there any other potential solutions to this issue that anyone has found?

@natowi
Copy link
Member

natowi commented Oct 1, 2019

Are there any other potential solutions to this issue that anyone has found?

@fitzmurphy Some cameras use extra EXIF fields which cause an error when importing images to Meshroom. To fix this problem, strip all uncommon EXIF data and add Make and Model. Now the Meshroom import should work. #397 (comment) You can use Exif tools like Exif Editor or ExifToolGUI.

@shikyojojo
Copy link

ok I have a sony xpheria xz1 and the error i get is
[14:42:31.206003][warning] Sensor width doesn't exist in the database for image(s):
- camera brand: Sony
- camera model: G8342
so what would my information be to plug in?

@fitzmurphy
Copy link

fitzmurphy commented Dec 15, 2019 via email

@natowi
Copy link
Member

natowi commented Dec 15, 2019

@ryankingart
Copy link

ryankingart commented Jun 24, 2020

Hello. I have the LG g7 thinQ Phone. Does anyone know what name I need to put in the file?
Thanks,

(edited)

@ryankingart
Copy link

ryankingart commented Jun 24, 2020

Hello,
Sorry I meant, I have the LG g7 thinQ. Not the g8.

Here is the phone I have, but I still can't find what to put in the file.
https://www.devicespecifications.com/en/model-camera/929648fc

@ryankingart
Copy link

Hello. I Fixed the Problem!
I am using the LG G7 thin Q Phone to take the photos. Here is the Text I put into the cameraSensors.db Document:

LGE;LM-G710;1/3.1

I placed it right underneath the text, Leica;Leica X2;23.6

@natowi
Copy link
Member

natowi commented Jun 25, 2020

1/3.1

wrong format, you need to look up the sensor width from this.

@ryankingart
Copy link

Oh ok. Can you help? I can't find anything online.

I have tried to do 2 photoscans, and they both turned out to be weird shaped objects. So yeah, it doesn't seem to be working.

@natowi
Copy link
Member

natowi commented Jun 25, 2020

@BlenderBurst Try 4.5

@ryankingart
Copy link

Ok, Thanks. I am doing another Photoscan right now, and I will let you know if it worked or not. Thanks!

@ryankingart
Copy link

@natowi Hey it worked great this time! Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug for actual bugs (unsure? use type:question) scope:AliceVision concerning alicevision library type:question
Projects
None yet
Development

No branches or pull requests