Ask Your Question
0

Stitching with camera translation

asked 2018-01-03 04:26:03 -0600

nadtn gravatar image

updated 2018-01-03 04:27:58 -0600

Hi can you help find a code witch takes 2 images in input and stichs them. I found a lot when the camera does rotation (homography, etc..) but not translation. (parallax error, distortion?)

Thank you in advance.

edit retag flag offensive close merge delete

Comments

see this answer

LBerger gravatar imageLBerger ( 2018-01-03 04:30:43 -0600 )edit

Thank you for your reply @LBerger I've tryed to reach you since i've seen you reply for some other questions. link textlink textlink text and some others.. but like i said i've tryed homography but it only works for a camera witch does a rotation not a translation. i've tryed it but it doesn't give good results, ie we can see a gap between the 2 images. can't find a code witch works for translating camera. the camera goes on an axe and takes images of somthing on a screen witch is like 72cm far away. Merci d'avance Laurent BERGER

nadtn gravatar imagenadtn ( 2018-01-03 05:00:47 -0600 )edit

Post two images

LBerger gravatar imageLBerger ( 2018-01-03 05:14:11 -0600 )edit

The size of the images are too big i think, can't attach them! How can i send them to you? @LBerger

nadtn gravatar imagenadtn ( 2018-01-03 07:30:48 -0600 )edit

i've putted them on my drive, here is the link: link text@LBerger

nadtn gravatar imagenadtn ( 2018-01-03 08:01:44 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-01-03 08:07:50 -0600

LBerger gravatar image

updated 2018-01-03 08:24:44 -0600

if you want I can post result using this command :

>G:\Lib\install\opencv\x64\vc15\samples\cpp\cpp-example-stitching_detailed.exe C:\Users\Laurent.PC-LAURENT-VISI\Downloads\1.bmp C:\Users\Laurent.PC-LAURENT-VISI\Downloads\2.bmp
 Finding features...
 [ INFO:0] Initialize OpenCL runtime...
[ INFO:0] Successfully initialized OpenCL cache directory: C:\Users\LAUREN~1.PC-\AppData\Local\Temp\opencv\3.4.0-dev\opencl_cache\
[ INFO:0] Preparing OpenCL cache configuration for context: NVIDIA_Corporation--GeForce_GTX_970--376_53
Features in image #1: 1053
Features in image #2: 756
Finding features, time: 1.36366 sec
Pairwise matchingPairwise matching, time: 0.6948 sec
Initial camera intrinsics #1:
K:
[1426.87277809228, 0, 335.5;
 0, 1426.87277809228, 447;
 0, 0, 1]
R:
[1, 0, 0;
 0, 1, 0;
 0, 0, 1]
Initial camera intrinsics #2:
K:
[1426.87277809228, 0, 335.5;
 0, 1426.87277809228, 447;
 0, 0, 1]
R:
[0.94900417, 0.0099171028, 0.26702875;
 -0.011483669, 0.98332953, -0.015599711;
 -0.15148048, 0.025041653, 0.95704192]
Camera #1:
K:
[2882.846565743107, 0, 335.5;
 0, 2882.846565743107, 447;
 0, 0, 1]
R:
[1, 0, -3.7252903e-09;
 0, 0.99999994, 4.6566129e-10;
 0, 0, 1]
Camera #2:
K:
[2897.357689482909, 0, 335.5;
 0, 2897.357689482909, 447;
 0, 0, 1]
R:
[0.9906382, 0.0070629502, 0.13633043;
 -0.0061396086, 0.99995524, -0.0071921097;
 -0.13637511, 0.0062877657, 0.9906373]
Warping images (auxiliary)...
Warping images, time: 0.179061 sec
Compositing...
Compositing image #1
Multi-band blender, number of bands: 7
Compositing image #2
Compositing, time: 2.10977 sec
Finished, total time: 5.78924 sec
edit flag offensive delete link more

Comments

What code did you use? (homography?) Did you see the result? Are the 2 images aligned correctly? @LBerger

nadtn gravatar imagenadtn ( 2018-01-03 08:16:55 -0600 )edit

You can send to me the final stitched image so i can see if it's working: [email protected]

nadtn gravatar imagenadtn ( 2018-01-03 08:18:22 -0600 )edit

code is an opencv example

LBerger gravatar imageLBerger ( 2018-01-03 08:23:53 -0600 )edit
1

I'll try this code. The result is good. It's my first post, so i don't know how to thank you for your help or make it solved but thank you.

nadtn gravatar imagenadtn ( 2018-01-03 10:01:39 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-01-03 04:26:03 -0600

Seen: 910 times

Last updated: Jan 03 '18