Conversion ti fits from CR2 changes geometry?

  • Posts: 290
  • Karma: 1
  • Thank you received: 18

Conversion ti fits from CR2 changes geometry? was created by mlarsson

Hi!

I know we have had this up before... but I don't know what came of it.

I use a Canon 1000D DSLR. I'm playing with using native format from the camera. And I've noticed that the geometry of the native CR2-files is different from the Fits-files that Ekos converts to.
My native CR2-files are 3906 x 2602. The fits files are 3893 x 2595.

Is there a sensible reason for this? Is it possible to have the fits files preserve the geometry (there are for instance processes in PixInsight that likes even numbers and dislikes uneven...)?

Magnus

C8, Losmandy G11, Canon 1000D astromodified.
3 weeks 2 days ago #33085

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Karma: 2
  • Thank you received: 42

Replied by Herrhausen on topic Conversion ti fits from CR2 changes geometry?

Hi, Magnus!

The issue comes up regularly. Ekos converts CR2 into FITS internally when a photo is taken. An option to do it later on has not been implemented. In this thread

indilib.org/forum/general/3323-question-...-cr2-conversion.html

Copello suggests a hack to do it anyway. I tried and it worked perfectly for me. I wish a conversion option would be implemented though.

CS
Last edit: 3 weeks 2 days ago by Herrhausen.
3 weeks 2 days ago #33088

Please Log in or Create an account to join the conversation.

Replied by knro on topic Conversion ti fits from CR2 changes geometry?

Can you post logs? So take one Native, then one FITS. Let see where the discrepancy comes. I don't have this issue on 600D here.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 weeks 2 days ago #33091

Please Log in or Create an account to join the conversation.

  • Posts: 290
  • Karma: 1
  • Thank you received: 18

Replied by mlarsson on topic Conversion ti fits from CR2 changes geometry?

Hi!

Here's a log. OK?

Magnus

C8, Losmandy G11, Canon 1000D astromodified.
3 weeks 1 day ago #33153
Attachments:

Please Log in or Create an account to join the conversation.

Replied by knro on topic Conversion ti fits from CR2 changes geometry?

Looks like it is getting subframed. Clear your camera configuration (the trash bin icon next to the camera name in Ekos camera module). Then enter the correct dimensions again and see how it goes.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 weeks 23 hours ago #33158

Please Log in or Create an account to join the conversation.

  • Posts: 290
  • Karma: 1
  • Thank you received: 18

Replied by mlarsson on topic Conversion ti fits from CR2 changes geometry?

Hi!

I guess part of the problem might be to understand what the correct dimensions are. I get some information here, for instance:

www.digicamdb.com/specs/canon_eos-1000d/

Which is what I typed in before. But the CR2-file has a different size, according to PixInsight. Should I use those numbers, the geometry of the CR2-file as given by PI, or what should I use?

Magnus

C8, Losmandy G11, Canon 1000D astromodified.
3 weeks 23 hours ago #33159

Please Log in or Create an account to join the conversation.

Replied by knro on topic Conversion ti fits from CR2 changes geometry?

I would try the CR2 dimensions and see how it goes from there. As long as you keep the format RAW I don't think you'll have troubles. Try and see the results.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 weeks 23 hours ago #33162

Please Log in or Create an account to join the conversation.

  • Posts: 36
  • Karma: 1
  • Thank you received: 15

Replied by Copello on topic Conversion ti fits from CR2 changes geometry?

I think one should use the value LibRaw infers after unpacking (and debayering) the data. According to your posted logs it should be:
3906 x 2602. This value should also be shown by PixInsight.

I have a similar issue with my Nikon D50. The Linux image viewer geeqie shows for RAW the dimension: 3008 x 2000,
also this value is presented at https://www.digicamdb.com/specs/nikon_d50/ whereas PixInsight shows
3039 x 2014.

Camera ........... Nikon D50
Timestamp ........ 2019-01-01T22:02:51Z
Exposure ......... 1/60s
ISO speed ........ 400
Focal length ..... 31 mm
Aperture ......... f/4.5 = 6.9 mm
CFA pattern ...... Bayer BGGR
Raw dimensions ... w=3040 h=2014
Image geometry ... x=0 y=0 w=3039 h=2014

Raw decoding parameters:
Output mode ............... demosaic
Interpolation ............. VNG
Interpolate as 4 colors ... disabled
Black point correction .... enabled
Highlights clipping ....... disabled
Wavelet noise threshold ... 0
FBDD noise reduction ...... 0
White balancing ........... disabled
Auto rotate ............... disabled
Output image .............. w=3039 h=2014 n=3 RGB


I just debugged the related struct field of libraw (to look inside). And indeed also there is the value: 3039 x 2014
$1 = {raw_height = 2014, raw_width = 3040, height = 2014, width = 3039, top_margin = 0, left_margin = 0, iheight = 2014, iwidth = 3039, raw_pitch = 6080, pixel_aspect = 1, 
  flip = 0, mask = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, raw_crop = {cleft = 65535, 
    ctop = 65535, cwidth = 0, cheight = 0}}

See also this post for an additional issue on dimensions: https://indilib.org/forum/ccds-dslrs/3792-canon-can-t-set-frame-size.html#28826
The following user(s) said Thank You: mlarsson
3 weeks 23 hours ago #33164

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Karma: 2
  • Thank you received: 42

Replied by Herrhausen on topic Conversion ti fits from CR2 changes geometry?

With resolution set to the 5D Mk2's nominal 5616x3744 the results are:

FITS: 5616x3744 (FitsView)
CR2: 5634x3755 (UFRaw) or 5626x3745 (RawTherapy).

After setting the resolution to 5634x3755 in Ekos the results are like this:
FITS: 5634x3753 (FitsView)
CR2: 5634x3755 (UFRaw) or 5626x3745 (RawTherapy).
Last edit: 3 weeks 18 hours ago by Herrhausen.
3 weeks 18 hours ago #33169
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Karma: 2
  • Thank you received: 42

Replied by Herrhausen on topic Conversion ti fits from CR2 changes geometry?

Is there a certain reason for not implementing a simple file requester that enables the user to select an already taken CR2 file and have it converted by Ekos? The whole conversion code is already there so why not use it? Copello's hack did work perfectly and the resulting FITS files had the desired resolution. One only has to select an alternative input source (file instead of camera), no?
3 weeks 18 hours ago #33170

Please Log in or Create an account to join the conversation.

Replied by knro on topic Conversion ti fits from CR2 changes geometry?

Herrhausen wrote: With resolution set to the 5D Mk2's nominal 5616x3744 the results are:

FITS: 5616x3744 (FitsView)
CR2: 5634x3755 (UFRaw) or 5626x3745 (RawTherapy).

After setting the resolution to 5634x3755 in Ekos the results are like this:
FITS: 5634x3753 (FitsView)
CR2: 5634x3755 (UFRaw) or 5626x3745 (RawTherapy).


Thanks for logs. So Ekos/INDI are indeed sticking to the dimensions given whenever it is possible to do so.

Libraw reports the CR2 resolution as 5634x3753.

So when you take 5616x3744, INDI can subframe this to the desired value. However, for 5634x3755, INDI cannot add two extra pixels to make 3753 become 3755, so it remains at the maximum reported height by Libraw which is 3755.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 weeks 9 hours ago #33182

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Karma: 2
  • Thank you received: 42

Replied by Herrhausen on topic Conversion ti fits from CR2 changes geometry?

When I set frame size to 5634x3753 the results are

FITS: 5634x3753
CR2: 5634x3755 (UFRaw), 5626x3745 (RawTherapy)
3 weeks 7 hours ago #33184
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.766 seconds