×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

v4l2 CCD & guiding issue

  • Posts: 314
  • Thank you received: 34
I dug out my USB-Webcam to prepare a new guiding test.
I have quite an issue:
If I start streaming the V4L2 CCD device I can adjust all image settings in the "V4l2 Control" tab and watch it live in the stream window.
The problem is if I then stop streaming and go to the EKOS Guide tab and do a CAPTURE
all controls in the image adjustments return to some kind of weird default value. For example
the exposure value jumps from my adjusted 7 to 5000... making a total overexposured image and guiding impossible. Also if I press LOOP in the guiding tab I cant adjust the v4l2 image parameters, they immediately jump back to the weird vales.

I made a video that shows the issue:

Anyone else having this problem?
--= human, without Windows™ =--
pls excuse my bad english! :)
6 years 7 months ago #19451

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

  • Posts: 314
  • Thank you received: 34

Replied by pauledd on topic v4l2 CCD & guiding issue

This camera (ov2710-1E) drives me crazy! Or maybe its the linux uvc driver... Even if I try to set exposure directly with v4l2-ctl it does weird things.
First, if I set exposure step by step from 0 to 20 the image gets brighter from 0-10. Then from 11 its dark again and gets brighter again to 20... I could repeat up to +5000. So the controls seems not to increase linear.
Second, if I list all controls ranges and look for the default values some of them are totaly out of bounds. Maybe the camera is reporting back wrong values.

Because of that and its bad low light performance I think I give up on that cam and going to effort an ASI174MM early next year or chistmas. I hope this cam will give me a more distinct control over exposure adjustments and more guiding stars...
--= human, without Windows™ =--
pls excuse my bad english! :)
6 years 7 months ago #19472

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

  • Posts: 1029
  • Thank you received: 301

Replied by Eric on topic Re:v4l2 CCD & guiding issue

The performance of the V4L2 drivers is heavily related to the version of the kernel. Which version kernel are you using? Do you have syslogs to share (with high log, say 7)?

-Eric
6 years 7 months ago #19481

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

  • Posts: 314
  • Thank you received: 34

Replied by pauledd on topic v4l2 CCD & guiding issue

well, on my RPi2 (were the cam is connected) I've running latest stable kernel for raspberry from git:
4.4.20-raspberrypi-v7+
On my kstars client I've kernel 4.11.1.

Ive not really a performance issue, more an settings issue.

I just run "v4l2-compliance" on the device and I get:
...
Control ioctls:
                fail: v4l2-test-controls.cpp(74): def < min || def > max
                fail: v4l2-test-controls.cpp(204): invalid control 00980900
                test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
                fail: v4l2-test-controls.cpp(306): node->controls.find(qctrl.id) == node->controls.end()
                test VIDIOC_QUERYCTRL: FAIL
                test VIDIOC_G/S_CTRL: OK
                fail: v4l2-test-controls.cpp(576): g_ext_ctrls worked even when no controls are present
                test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
                test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
                test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
                Standard Controls: 0 Private Controls: 0
...
Total: 43, Succeeded: 39, Failed: 4, Warnings: 1

And "v4l2-ctl --all" gives:
Driver Info (not using libv4l2):
        Driver name   : uvcvideo
        Card type     : USB 2.0 Camera
        Bus info      : usb-3f980000.usb-1.5.3
        Driver version: 4.4.20
        Capabilities  : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
        Width/Height      : 800/600
        Pixel Format      : 'YUYV'
        Field             : None
        Bytes per Line    : 1600
        Size Image        : 960000
        Colorspace        : sRGB
        Transfer Function : Default
        YCbCr/HSV Encoding: Default
        Quantization      : Default
        Flags             : 
Crop Capability Video Capture:
        Bounds      : Left 0, Top 0, Width 800, Height 600
        Default     : Left 0, Top 0, Width 800, Height 600
        Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 800, Height 600
Selection: crop_bounds, Left 0, Top 0, Width 800, Height 600
Streaming Parameters Video Capture:
        Capabilities     : timeperframe
        Frames per second: 20.000 (20/1)
        Read buffers     : 0
                     brightness (int)    : min=-64 max=64 step=1 default=-8193 value=0
                       contrast (int)    : min=0 max=64 step=1 default=57343 value=0
                     saturation (int)    : min=0 max=128 step=1 default=57343 value=0
                            hue (int)    : min=-40 max=40 step=1 default=-8193 value=0
 white_balance_temperature_auto (bool)   : default=1 value=0
                          gamma (int)    : min=72 max=500 step=1 default=57343 value=72
                           gain (int)    : min=0 max=100 step=1 default=57343 value=0
           power_line_frequency (menu)   : min=0 max=2 default=1 value=0
      white_balance_temperature (int)    : min=2800 max=6500 step=1 default=57343 value=2800
                      sharpness (int)    : min=0 max=6 step=1 default=57343 value=0
         backlight_compensation (int)    : min=0 max=2 step=1 default=57343 value=0
                  exposure_auto (menu)   : min=0 max=3 default=0 value=1
              exposure_absolute (int)    : min=1 max=5000 step=1 default=157 value=2000
         exposure_auto_priority (bool)   : default=0 value=0

The weirdness starts at "brightness"... min -64 max +64.. so I would expect default at 0 but it is at -8192???. Same for contrast, saturation,hue and so on. And It doesnt matter where I put the cam on. Even on my Client PC with the 4.11.1. kernel I get the same behaviour so I think its not a kernel issue. May the cam's firmware or the part of electronics that stores the default values is simply crappy...
--= human, without Windows™ =--
pls excuse my bad english! :)
6 years 7 months ago #19513

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

Exposure is changed to 5000 because the guide exposure is 0.5 seconds.. so reduce that to reduce the exposure.
6 years 7 months ago #19517

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

  • Posts: 314
  • Thank you received: 34

Replied by pauledd on topic v4l2 CCD & guiding issue

Oh, ok, I didn't knew that the values are related. I try next clear night.

I have another problem. My guide scope is only 180mm focal lenght and I set under calibration settings
Pulse to max 5000 and Iteration also to max 10. Even with that settings the guide star moves only a tiny bit
compared to the whole image frame during the whole calibration, so I ve a ~50% of the calibration fails due to the star not moving enough. Is there something I can do/tweak further to make the guide star move more? Because I read a lot of people use their 8x50 viewfinder as a guide scope without issues.
--= human, without Windows™ =--
pls excuse my bad english! :)
6 years 7 months ago #19523

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

  • Posts: 314
  • Thank you received: 34

Replied by pauledd on topic v4l2 CCD & guiding issue

Reporting back: some kind off success! (with the crappy cam)

After playing around with guiding settings, exposure values and guide stars and calibration attempts
I found the DEC axis had a huge backlash. I observed this while doing calibration. After calibration completes
the first DEC direction I noticed the star needed some more iterations to begin to move to the opposite direction.
So I step by step increased the DEC backlash value and re-did the calibration. As I reached 500 microsteps I saw
the guide star imeadiately began to move with the DEC drifting reverse.
Since then my SIG(RA/DEC)" values stayed below 1.5 quite for a while. I still have some problems to control the
guide cam image quality. It flickers quite heavy and has a lot of jpeg-like comression artifacts, but as I can remember I selected MJPEG as streaming format. I will
try to switch to YUY2 but that makes the data size quite big for my wlan connection and might interfere guiding while ekos is downloading finished images.
Nevertheless I did a 10 minutes exposure and the stars still looked quite round .


@knro
Is it possible to change the decimals of the "Exp:" doublespinbox from 2 to 4? Because I can set my cameras exposure only in 100 steps (Exp: 0,01 = 100), but
with this cam I really need singe steps adjustments (Exp: 0,0001 = 1) . You dont need to change that in kstars for anyone because I think I am the only one with that strange crappy settings behaviour, so I would change the code on my git clone only. But I couldn't find the location where to put QDoubleSpinBox::setDecimals(4)...
--= human, without Windows™ =--
pls excuse my bad english! :)
6 years 7 months ago #19663

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

well, I was getting calibration failure on my EQ8 yesterday, the DEC wasn't moving at all. I hacked the EQMod source the change the magnitude of DEC guide change and that worked pretty well for the night, but it might as well could be due to backlash issues. I am waiting for Jean-Luc input on this matter. The guide exposure is already 3 digits in GIT now.
6 years 7 months ago #19665

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

  • Posts: 314
  • Thank you received: 34

Replied by pauledd on topic v4l2 CCD & guiding issue

ok, thanks, with 3 digits I get only 10 steps but I will see if that is sufficient.
--= human, without Windows™ =--
pls excuse my bad english! :)
6 years 7 months ago #19666

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

  • Posts: 226
  • Thank you received: 88

Replied by Jean-Luc on topic v4l2 CCD & guiding issue

Hi,
I've checked the pulse guide code and it seems it is ok up to the level of serial commands.
Now the big difference between RA axis and Dec axis is that the Dec axis should be started when guiding. The RA axis just sees its internal speed register changed. Concerning the Dec axis it should explicitly be started with a :J2 command. I wonder if the motor startup time is not too long in that case especially if the mount uses some kind of energy savings. A good test would be to use a very low custom track rate in Dec (the min is 0.8 arcsec./s) to keep the Dec motor running and to check if Dec guiding works as wanted in that case.
Otherwise how did you proceed to change the magnitude of the Dec guiding ? Simply changing the speed, the time or both ?
Jean-Luc.
The following user(s) said Thank You: Jasem Mutlaq
6 years 6 months ago #19686

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

Ah very smart suggestion! I will test that today. Dec indeed seems to not move even when using ST4. Also is default guide rate 0.3x? it seems most mounts use 0.5x by default. The way I did it now is to change the rate itself withing the code, it's hack to get calibration to get going, but after my observation run today is over, I will test what you suggested.
6 years 6 months ago #19699

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

setting the custom DE tracking made it worse because the guide back wouldn't reverse direction in the DEC reverse stage. I found out that if I change pulse width to 1500ms and guide rate to 0.5x then it works. But what I noticed that is that when it reverses DEC, it takes 3-4 seconds/iterations before I can see any actual changes in the star shift! This doesn't happen with RA, it reverses immediately and I can see the result.

For ST4 guiding, calibration worked when I set N/S guide rate to 0.75x. I was trying to determine if the order is perhaps reversed? is rate 0 = 1.0x sidereal? It starts 1.0, 0.75, 0.5, then 0.25
6 years 6 months ago #19716

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

Time to create page: 0.423 seconds