Author Topic: Dynamic Crop not precise  (Read 1531 times)

Offline tommy_nawratil

  • Member
  • *
  • Posts: 53
Dynamic Crop not precise
« on: 2017 April 04 17:07:39 »
hi,

don't know if this is a real bug, to me it looks like one.. PI 1.8-1195 updated, Win10

Want to use Dynamic Crop to ecactly crop a dark of my Astrel A to fit Astrel B,
the guys made the upgrade and sensor is the same, but output area is different.
Selection can be made precisely in Cynamic crop, to the very pixel.
But executing always gives a result, cropped to a pixel row higher than selected.
Tried to change parameters, no it does not want my selection.

Darkframe:
https://1drv.ms/u/s!AlbinznzdHHHhnYG43UzptsoD-vI

DynCrop Icon:
https://1drv.ms/u/s!AlbinznzdHHHhnXXQiiTtFcTBJHT

Zoom in 8:1 and watch the two hotter pixels left bottom corner..
Selection in DynCrop leaves one row beneath the lower one.
Ececuted, the row is cropped and whole selected area is shifted one pixel up.
Whatever I do, same result.
Of course, this is useless, darkframes need to be pixel precise.
Anybody can help?  :)

besr regards,
Tommy
« Last Edit: 2017 April 04 17:44:06 by tommy_nawratil »

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Dynamic Crop not precise
« Reply #1 on: 2017 April 05 04:54:45 »
Hi Tommy,

Looking at your FITS and XPSM files, I can see that you are trying to create a cropped image with a size of 3328 x 2534 pixels - no problems there.

However, you are using a 'centred anchor' at (1703.00, 1298.99) which may well be giving rise to 'integer-rounding' errors.

It might be worth your while trying to change the anchor-point from 'centre' to (for example) 'top-left'. Once you have done that you can still specify (either dynamically, or manually) the crop size to be 3328 x 2534. However, you can also then specify the anchor point to be (39, 32) - noting that none of these specifications involves anything other than 'whole integer' values.

Now, if this is a crop action that you expect to perhaps be repeating on a regular basis, it may even be beneficial to avoid using the DynamicCrop process and to use the simple Crop process instead. (You would perhaps only use the DynamicCrop process to initially determine the crop area).

I don't know if this is going to resolve your issues, but it might be wortha try.
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline tommy_nawratil

  • Member
  • *
  • Posts: 53
Re: Dynamic Crop not precise
« Reply #2 on: 2017 April 05 17:51:04 »
dear Neil,

thanks for your input!
I just drew the recangle and execute DynCrop, expecting WYSIWYG.
But it was not the case, and pulling the rectangle anchor to an integer number did not work too.
Fortunately, I found a workaround.
But this remains a mystery, I have used DynCrop 1000x with perfect result,
and hope for another 1000x :-)

clear skies, Tommy

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Dynamic Crop not precise
« Reply #3 on: 2017 April 06 04:24:27 »
Hi Tommy,

So, what was your work-around?
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline tommy_nawratil

  • Member
  • *
  • Posts: 53
Re: Dynamic Crop not precise
« Reply #4 on: 2017 April 06 13:33:22 »
hi Niall,

making new darks and bias  :D

Tommy