Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tcherno

Pages: [1] 2
1
General / Re: Pixel Offset on undistorted photos output
« on: January 30, 2015, 08:58:57 PM »
Ok,
It makes sense now.
Thanks for your time and your answers.

2
General / Re: Pixel Offset on undistorted photos output
« on: January 29, 2015, 08:38:08 PM »
Thks for your answers.
No Enwaii undistort photos from the center, of course.
But Photoscan undistorted photos seems to be offseted from the upper left corner.
It seems that the undistorsion is done from the center anyway. (I totally hope so!)

But could a member of the dev team confirm that please, and enlight us about this offset?

3
General / Re: Pixel Offset on undistorted photos output
« on: January 28, 2015, 01:54:28 AM »
I used Enwaï.
A standalone, very powerfull, I can set profiles for specific lenses and its differents focal length.
The undistorsion process is correct, I don´t doubt that.

Don't you see this offset in your tests?

4
General / Re: 5 pixels offset after export undistorted photos
« on: January 27, 2015, 05:50:55 PM »
Sorry, double post...
I thought that the first one didn't work.
Sorry about that.

5
General / 5 pixels offset after export undistorted photos
« on: January 27, 2015, 05:49:06 PM »
Hello everyone,

I'm testing Photoscan and the undistorsion it provides on photos used in the calibration process.
I tried to use undistorted photos as input, and I tried to check the option Fix Calibration, so photoscan doesn't undistort the photos when it aligns the cameras.
It never gave me good results (align or mesh).
But when I don't check this option, and allow photoscan to undistort my already undistorted photos, I can see that the result is very accurate.

I'm quite happy with that, but I'm wondering why does Photoscan offset the undistorted photos?

I tried to give distorted photos as input, undistorted photos (with Fix Calibration checked), undistorted photos (without Fix Calibration checked), and I always have this pixel offset, (even if I have to admit that it's smaller when the input is undistorted).

Thanks for your help guys!

6
General / Pixel Offset on undistorted photos output
« on: January 27, 2015, 05:26:00 PM »
Hello everyone,

I'm testing Photoscan and the undistorsion it provides on photos used in the calibration process.
I tried to use undistorted photos as input, and I tried to check the option Fix Calibration, so photoscan doesn't undistort the photos when it aligns the cameras.
It never gave me good results.
But when I don't check this option, and allow photoscan to undistort my already undistorted photos, I can see that the result is very accurate.

I'm quite happy with that, but I'm wondering why does Photoscan offset the undistorted photos?

I tried to give distorted photos as input, undistorted photos (with Fix Calibration checked), undistorted photos (without Fix Calibration checked), and in each case, I always have this pixel offset, (even if I have to admit that it's smaller when the input is undistorted).

Can you explain why is that?

Thank you for your help.

7
General / Re: Undistort photos after align?
« on: January 20, 2015, 01:45:53 PM »
Thanks Bigben,

I'm going to try a calibration with the option Fix Calibration checked.
I come back soon for a feeback.

8
General / Undistort photos after align?
« on: January 20, 2015, 05:24:00 AM »
Hi everyone,

I'm testing a workflow to scan a set with photoscan, and my friend and I are used to undistort photos before to use them in tracking softwares. To do so, we use Enwaï, a standalone and maya plugin that allows us to use a specific grid of distorsion for our specific cameras, with a lot of options (non linear undistort process, etc..). It's very powerfull and the result is very accurate, so we thought that it could be better to undistort photos before using them in photoscan.

But it seems that it doesn't work well if we give to photoscan undistorted photos to align.

I just want to be sure of the full process you recommend.

Do we just have to give photo (with distorsion) to photoscan, and then export undistorted photos after the align photo process, in order to camera map the model?


If this is the good way to use photoscan, what about your undistort process?
No offense, but I'm sceptical about the full automatic process, is it really as accurate as a process with a specific distorsion reference grid?


C.

9
Python and Java API / Re: Focal length differences in xml and chan export
« on: January 19, 2015, 03:16:38 PM »
Okay!
I get it.
Thank you very much for your very fast answers.
I can do everything that I need.

You rock.

;)

10
Python and Java API / Re: Focal length differences in xml and chan export
« on: January 19, 2015, 02:51:31 PM »
Hello Dmitry and thank you for your answer.

Yes I understand perfectly your explanation about the sensor size height and width.
It works when the ratio is correct, even if the values are not in a "real scale".

But I need to calculate the focal_length that you export in the fbx file, and I can't reach the good value with the formula Alexey gave me.
As you can see, I get a more than 2 deg difference...

fbx focal : 58.098
formula focal : 56.084

This is my big problem.
I unfortunately can't solve it alone.

I give you the values exported in the xml (the crop factor of the camera = 1) :

       <sensor id="0" label="Canon EOS 5D Mark II (50 mm)" type="frame">
        <resolution width="5616" height="3744"/>
        <property name="pixel_width" value="6.5490028490028532e-003"/>
        <property name="pixel_height" value="6.5490028490028532e-003"/>
        <property name="focal_length" value="5.0000000000000000e+001"/>
        <property name="fixed" value="false"/>
        <calibration type="frame" class="adjusted">
          <resolution width="5616" height="3744"/>
          <fx>8.5637711649369339e+003</fx>
          <fy>8.5637711649369339e+003</fy>
          <cx>2.8211809761145587e+003</cx>
          <cy>1.8677934082374925e+003</cy>
          <k1>-5.3464376564462150e-003</k1>
          <k2>-2.1316748876923912e-002</k2>
          <k3>2.0992605355326971e-001</k3>
        </calibration>
      </sensor>

I try this :

fx = 8.5637711649369339e+003
fy = 8.5637711649369339e+003
pixelHeight = 6.5490028490028532e-003
pixelWidth = 6.5490028490028532e-003

focal = (fx*pixelHeight+fy*pixelWidth)/2
focal = 56.0841617574

and in the fbx openend in Maya 2015, I have a value of 58.098, which seems to be correct and match the model.

Can you tell me where is the problem in the calculation please?








11
Python and Java API / Re: Focal length differences in xml and chan export
« on: January 18, 2015, 03:13:05 AM »
Hi.
Thank you very much for your answers Alexey.

It seems to be almost good with the focal length, but the result of the formula you gave me :

focal = (fy*sensor_pixel_height + fx*sensor_pixel_width)/2
focal = 56.084

is unfortunately not the same than the focal I have in the fbx file (=58.098).

The fbx export is correct, and the camera matches the model and the image Plane in Maya. So I really need to get the same exact formula you applie to export the cameras to a fbx file.

I'm stuck with this problem, and I know that it's probably nothing.
Please, can you help me?




12
Python and Java API / Re: Focal length differences in xml and chan export
« on: January 14, 2015, 07:22:02 PM »
Ok, thank you very much.

And what about the camera aperture?

How do you get the 38.100 and 25.400 values from the xml?
Do I miss something else?


EDIT :

Ok, I found how to calculate the camera aperture values that are exported (fbx) :
camera aperture W = imageWidth * 25.4 / imageHeight
camera aperture H = 25.4
(I guess the 25.4 factor comes from the unit conversion mm to inches)

I'm not sure this is correct, because I thought that these values depends on the sensor size of the camera, which is not 38.1 and 25.4 on the Canon 5D Mark II my friend is using.
Maybe you can enlight me here too.



13
Python and Java API / Re: Focal length differences in xml and chan export
« on: January 14, 2015, 05:29:46 PM »
Hi again.

I don't understand why the formula doesn't give me the same result than in a fbx export.
Please, can you tell me how to extract these two values from the xml to match exactly the values in a fbx export?

focal lenght
camera aperture (inches or mm, I don't care)

In the xml I have this :

    <sensors>
      <sensor id="0" label="Canon EOS 5D Mark II (50 mm)" type="frame">
        <resolution width="5616" height="3744"/>
        <property name="pixel_width" value="6.5490028490028532e-003"/>
        <property name="pixel_height" value="6.5490028490028532e-003"/>
        <property name="focal_length" value="5.0000000000000000e+001"/>
        <property name="fixed" value="false"/>
        <calibration type="frame" class="adjusted">
          <resolution width="5616" height="3744"/>
          <fx>8.5637711649369339e+003</fx>
          <fy>8.5637711649369339e+003</fy>
          <cx>2.8211809761145587e+003</cx>
          <cy>1.8677934082374925e+003</cy>
          <k1>-5.3464376564462150e-003</k1>
          <k2>-2.1316748876923912e-002</k2>
          <k3>2.0992605355326971e-001</k3>
        </calibration>
      </sensor>
    </sensors>

In the relative fbx I have these values (that's what I would like to be able to calculate):
focal length : 58.098
camera aperture in mm : 38.100 and 25.400


and when I try to calculate them with the formula I get (wrong result):
focal length : 50.000
camera aperture : 36.992 and 24.661


I'm probably wrong, so could you give me the good formulas to get the good values please (fbx values works fine)?

Thank you again!

14
Python and Java API / Re: Focal length differences in xml and chan export
« on: December 19, 2014, 05:29:59 PM »
Hi again,

I tried the formula you gave me but my english and my camera science are not as accurate as I need to make it work.
I don't  have the same result than in the chan file...

I tried this to test it :


## Values I just copy from the xml manually for the test
fy =7.9821037943715528e+03
foc = 5.0000000000000000e+01

import math
fov = 2.0 * math.atan( (fy-foc)/2 /fy) * 180.0 / 3.1415926535897932384626433832795
print fov
# >>> 52.8426216048
 
and in the chan I have a fov = 27.2532

It must be the height that I didn't understand well in your reply.
Sorry about that, could you tell me more about it please?

Thanks again very much for your help.




15
Python and Java API / Re: Focal length differences in xml and chan export
« on: December 19, 2014, 12:48:25 PM »

Thank you very much for your very useful answer!

Pages: [1] 2