-
Notifications
You must be signed in to change notification settings - Fork 204
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
indi-gphoto improvements? #178
Comments
Regarding raw2image, I think at the time of writing this code the imgdata structure was not populated until this conversion was made. So you tested with unpack and that was sufficient to unpack everything including the memory image buffer? Whatever changes made to the driver has to be consistent with how the driver is currently operating to avoid any regressions. We don't folks to throw away valuable frames due to incompatibilities in the produced frames (size or CFA pattern wise). Another issue is that this has to work across multiple manufactures (Canon, Nikon, Sony..etc). |
Yes. The documentation is a bit confusing, so I am not sure if it is true for all camera models, but in my case I did not need the raw2image function.
Of course. That's why I wanted to discuss everything first. But in a way we already have the "regression" due to the libraw changes, i.e. calibration frames captured with libraw-0.19 will not work with light frames captured wit libraw-0.20
Agreed. However I can only test with Canon. Some other aspects which could be changed in the driver:
and then again when processing the image data in gphoto_readimage.cpp, working on the temporary file on disk: indi-3rdparty/indi-gphoto/gphoto_readimage.cpp Lines 311 to 324 in 918e8c5
This led me to two questions:
My main goals would be simpler code and hopefully some speed improvements. At the moment I take most of my images with a raspberry pi and the latency between capturing and showing the image can be annoying for tasks like polar alignment and focusing. The every second less would be an improvement. In your opinion, should I continue working on this, or would it be better to avoid the risk of regressions and leave everything as it is? |
To follow up with this, the driver is working fine with libraw 20. Please reopen if you believe this is still an issue. |
While looking at the indi-gphoto source in #173 and #176, I experimented with several aspects of the code which might lead to improvements. But since I have only hacked in the driver for a few days now I wanted to discuss these changes before I continue working on them.
As far as I can see the call to raw2image() in is unecessary:
indi-3rdparty/indi-gphoto/gphoto_readimage.cpp
Lines 335 to 340 in 918e8c5
At least I can see no difference in the resulting image with and without it.
With the aim to improve the situation with respect to indi_gphoto compatibility with libraw-2.0 #176 and changing frame dimensions I changed the way how the raw image is converted. Now the whole raw frame is decoded, and not only the image area as reported by libraw. This way the image cropping can be done by the user, so in principle one could get the old behavior (libraw-0.19), the new behavior (libraw-0.20), or the original canon behavior by defining the respective starting x and y values.
On the one hand this leads to simpler code and more flexibilty, on the other hand it is harder for the user to know what parameters should be used. By setting "intuitive" values (starting values of 0, width and height as stated by the camera manufacturer), one would get black borders and not the whole image.
In order to handle the shifting bayer patterns with different offsets I set the XBAYROFF and YBAYROFF tags if the respective margins are uneven. This would replace
indi-3rdparty/indi-gphoto/gphoto_ccd.cpp
Lines 1487 to 1492 in 918e8c5
When testing this I realized that kstars does not seem to respect those tags when debayering an image. The captured fits file is correctly rendered in siril. I did not look where the debayering takes place, if it is in kstars or indi.
I removed lots of unused code, most of it for the dcraw related functions
All the changes can be seen in knallio@3c34350. Of course they are highly experimental...
Please let me know if any of this might be helpful/usable and if I should continue working on this.
The text was updated successfully, but these errors were encountered: