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

texturing_orthophoto_spotscale_additions branch odm_texturing issue #33

Closed
mtrl opened this issue Jan 8, 2015 · 23 comments
Closed

texturing_orthophoto_spotscale_additions branch odm_texturing issue #33

mtrl opened this issue Jan 8, 2015 · 23 comments

Comments

@mtrl
Copy link

mtrl commented Jan 8, 2015

I'm getting the following error when running the texturing branch against a data set at the "running texturing" stage. Is there a recommended virtual environment for development/testing? I'm testing on an Ubuntu 12.04.5 x32 machine on Digital Ocean's cloud. Log output here

Images attached
screen shot 2015-01-08 at 22 43 11

  - running texturing - 
OpenCV Error: Assertion failed (ssize.area() > 0) in resize, file /build/buildd/opencv-2.3.1/modules/imgproc/src/imgwarp.cpp, line 1428
Error in OdmTexturing:
/build/buildd/opencv-2.3.1/modules/imgproc/src/imgwarp.cpp:1428: error: (-215) ssize.area() > 0 in function resize

For more detailed information, see log file.


quitting cause: 
"/root/db/../OpenDroneMap/bin/odm_texturing" -bundleFile /root/db/reconstruction-with-image-size-1200/pmvs/bundle.rd.out -imagesPath /root/db/ -imagesListPath /root/db/reconstruction-with-image-size-1200/pmvs/list.rd.txt -inputModelPath /root/db/reconstruction-with-image-size-1200-results/odm_mesh-0000.ply -outputFolder /root/db/reconstruction-with-image-size-1200-results/odm_texturing/ -textureResolution 4096 -bundleResizedTo 1200 -textureWithSize 3600 -logFile /root/db/reconstruction-with-image-size-1200/odm_texturing/odm_texturing_log.txt
returned with code 256
@mtrl mtrl changed the title texturing_orthophoto_spotscale_additions branch. texturing_orthophoto_spotscale_additions branch odm_texturing issue Jan 8, 2015
@dbaldwin
Copy link
Contributor

dbaldwin commented Jan 9, 2015

Same problem here. Here is the output of my log file which is fairly similar to @mtrl but obviously different version # for opencv:

Bundle path was set to: /home/ubuntu/caliterra/reconstruction-with-image-size-1200/pmvs/bundle.rd.out
Images path was set to: /home/ubuntu/caliterra/
Images list path was set to: /home/ubuntu/caliterra/reconstruction-with-image-size-1200/pmvs/list.rd.txt
Input model path was set to: /home/ubuntu/caliterra/reconstruction-with-image-size-1200-results/odm_mesh-0000.ply
Output folder path was set to: /home/ubuntu/caliterra/reconstruction-with-image-size-1200-results/odm_texturing/
The texture resolution was set to: 4096
The resized resolution used in bundler was set to: 1200
The resolution to texture with was set to: 3600
Log file path was set to: /home/ubuntu/caliterra/reconstruction-with-image-size-1200/odm_texturing/odm_texturing_log.txt
Successfully loaded 199906 polygons from file.
Successfully read the bundle file.
Successfully read the image list file.
Visible faces: 0
Occluded faces: 199906
Faces sorted into 1 textures.
Error in OdmTexturing:
/build/buildd/opencv-2.4.8+dfsg1/modules/imgproc/src/imgwarp.cpp:1824: error: (-215) ssize.area() > 0 in function resize

@smathermather
Copy link
Contributor

I haven't seen this. Are you both running 32-bit machines?

@dbaldwin
Copy link
Contributor

I'm running Ubuntu 14.04 64 bit. I've been looking into this some more and here is the line of code where the error occurs:

https://github.com/Itseez/opencv/blob/2.4.8.x-prep/modules/imgproc/src/imgwarp.cpp#L1824

Am trying to see if I can isolate the problem.

@mtrl
Copy link
Author

mtrl commented Jan 11, 2015

I'm running Ubuntu 12.04.5 32 bit against this data set https://www.dropbox.com/sh/1rt1qdh7tw2mybi/AAAv7zukDC7fszyJMXfc5x8wa?dl=0 the geotaghed folder

@dbaldwin
Copy link
Contributor

I may have found the issue here. It has to do with the pmvs output file. For example, the job I just ran had a list file at this location:

/mnt/odm_data/benchmark/reconstruction-with-image-size-1200/pmvs/list.rd.txt

I ran it on the odm_data benchmark folder:

https://github.com/OpenDroneMap/odm_data/tree/master/benchmark

Notice how those images all have caps .JPG file extensions? Well the list.rd.txt output looks like this:

./DSC05510.jpg
./DSC05511.jpg
./DSC05512.jpg
./DSC05513.jpg
./DSC05514.jpg
.......

This causes the OpenCV error mentioned above since Linux is case sensitive and can't find the file. I went and lowercased all the file extension in my benchmark folder to match the list.rd.txt file and everything finished processing.

@smathermather
Copy link
Contributor

Sounds like a regression. I think earlier versions auto renamed such cases.
On Jan 15, 2015 1:13 AM, "Dennis Baldwin" notifications@github.com wrote:

I may have found the issue here. It has to do with the pmvs output file.
For example, the job I just ran had a list file at this location:

/mnt/odm_data/benchmark/reconstruction-with-image-size-1200/pmvs/list.rd.txt

I ran it on the odm_data benchmark folder:

https://github.com/OpenDroneMap/odm_data/tree/master/benchmark

Notice how those images all have caps .JPG file extensions? Well the
list.rd.txt output looks like this:

./DSC05510.jpg
./DSC05511.jpg
./DSC05512.jpg
./DSC05513.jpg
./DSC05514.jpg
.......

This causes the OpenCV error mentioned above since Linux is case sensitive
and can't find the file. I went and lowercased all the file extension in my
benchmark folder to match the list.rd.txt file and everything finished
processing.


Reply to this email directly or view it on GitHub
#33 (comment)
.

@bgirardot
Copy link
Contributor

Bah, I should have read more carefully this thread, sorry I see you already had it figured out with the file names being case sensitive sorry for the bother.

@i--storm
Copy link

i--storm commented Feb 2, 2015

Confirm issue. All works fine after renaming file extensions to lowercase

@jmwhite
Copy link

jmwhite commented Feb 6, 2015

FWIW here is a simple bash command to rename the files from the bash shell. It must be run from within the data directory:

for file in *.JPG ; do echo $file; mv $file basename $file .JPG.jpg; done

@smathermather
Copy link
Contributor

It's interesting. I haven't been able to confirm this issue -- I've run it on directories with files named with JPG extension in caps without event.

Is this an artifact of file system, e.g. running in a shared NTFS directory on a Linux VM with a Windows host?

@dbaldwin
Copy link
Contributor

dbaldwin commented Feb 6, 2015

Interesting that you can't reproduce. I've run into this multiple times on
Amazon EC2 running Ubuntu 14.0.4. All with photos that have caps extensions
(.JPG). I'm going to run another set over the weekend and will report back.

On Fri, Feb 6, 2015 at 11:27 AM, Stephen Mather notifications@github.com
wrote:

It's interesting. I haven't been able to confirm this issue -- I've run it
on directories with files named with JPG extension in caps without event.

Is this an artifact of file system, e.g. running in a shared NTFS
directory on a Linux VM with a Windows host?


Reply to this email directly or view it on GitHub
#33 (comment)
.

@smathermather
Copy link
Contributor

Have you tried on a local vm?

@dbaldwin
Copy link
Contributor

dbaldwin commented Feb 7, 2015

No, but I'll see if I can setup Vagrant on my Mac and give it a run there.
I do have a PC where I may be able to give this a try as well.

On Fri, Feb 6, 2015 at 4:50 PM, Stephen Mather notifications@github.com
wrote:

Have you tried on a local vm?


Reply to this email directly or view it on GitHub
#33 (comment)
.

@smathermather
Copy link
Contributor

Thanks @dbaldwin.

@glw
Copy link

glw commented Feb 11, 2015

Hi, I was running into a problem with the texturing as well, when I found this open issue. I am running Virtualbox on windows8 64, virtualmachine is ubuntu 64 14.04. Originally I ran a subset of @dbaldwin caliterra images with the upper .JPG as the file extension and got this error message:

Error in OdmTexturing:
Error in OdmTexturing:
Failed to read image:
'/home/user/source/OpenDroneMap/test//IMG_9427.jpg'

** Notice the incorrect path with double '/' as well as the lower .jpg.

I re-ran the same imagery with lower .jpg extension with a successful output.

@smathermather
Copy link
Contributor

Finally replicated myself. I'm not sure why I wasn't seeing this before, but it needs a patch, perhaps a little rename for upper case extensions at the start of the script. Anyone want to take a crack at it?

@dbaldwin
Copy link
Contributor

@smathermather I'm currently running a job with vagrant_odm using Ubuntu 12.04 32 bit. I'll see what happens there. Then I'll try the same with 64 bit. I'll see if I can give the extension rename a try in the next day or two.

@glw thanks for confirming. FWIW the double slash isn't a deal breaker, but would be nice to clean up. Linux will still be able to find the path.

@w0rcy
Copy link

w0rcy commented Feb 16, 2015

@jmwhite, I haven't gotten your script to change to lower case .jpg to run, but I think I do not understand how to use the highlighted section in the middle. Can you give an example of how that line is used?

@bgirardot
Copy link
Contributor

@w0rcy I don't know if it is on every system, but on my deb/ubuntu VMs I just do this:

cd /directory_of_images
rename 'y/A-Z/a-z/' *

It just makes everything in the filename lowercase, but that is fine for my needs.

@w0rcy
Copy link

w0rcy commented Feb 16, 2015

Thanks, @bgirardot. All lower case is fine with me. Thanks also to all who are working on this software. I have been running tests on your odm_data and on my own and it is getting better all the time.

@smathermather
Copy link
Contributor

I like that @bgirardot -- my approach is more crude:
for file in *.JPG; do mv "$file" "basename $file .JPG.jpg"; done;

@smathermather
Copy link
Contributor

@dbrgn
Copy link
Contributor

dbrgn commented Aug 8, 2015

As we see here...

quitting cause:
"/code/bin/odm_texturing" (...)

...the error message occurs in the odm texturing program.

The main error message is Failed to read image: '/images//DSC05275.jpg'. When looking at odm_texturing/src/OdmTexturing.cpp, I can find this message only in one place: OdmTexturing.cpp#L359-362:

// Read image to get full resolution size
cv::Mat image = cv::imread(cam.texture_file);

if (image.empty())
{
    throw OdmTexturingException("Failed to read image:\n'" + cam.texture_file + "'\n");
}

So the problem seems to come from the fact that cam.texture_file (and thus the bundle file) contains lowercase instead of uppercase filename endings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants