×
INDI Library v1.8.8 Released (09 Jan 2021)

Here are the changes from v1.8.7 to v1.8.8

ASI178 Camera Performance on Rasperry PI 4

2 months 1 week ago
pawel-soja
New Member
New Member
Posts: 12
Karma: 5
More
Topic Author
ASI178 Camera Performance on Rasperry PI 4 #62718
Hi!

Has anyone managed to reach the maximum number of frames declared by the manufacturer on the Raspberry PI for full resolution (> 40fps)?
I have got ASI178MM and (when there is good cosmic radiation :)) I am getting 27fps (should be 60fps).

The problem may not be directly related to the great libraries you create, but the hardware that many of you probably use.
I decided to add a Raspberry PI 4 to my telescope to remotely control it and cameras, focusers and other devices.
I spent most of my life on Linux and there was no problem to run and add missing drivers.
I'm a console guy, I don't use raspberry graphics environments.
I try not to spend resources on "elegant" stuff.

I am trying to reach the maximum frame rate on an ASI178 camera at full resolution.
To increase the number of frames, I added a proposal to the Indi libraries.
Now I get this value on the Thinkpad Extreme X1 laptop and 27fps unstable on the raspberry.
To rule out Indi problems (which shouldn't exist anymore), I wrote a simple program that only reads camera frames in a loop. Something like:
// set minimum exposure, etc...
tic();
for(int i = 0; i < 1000; ++i) getVideoData(buffer, bufferSize);
toc();
The achieved parameters are close to what the Indi libraries are achieving now. So the problem is with the hardware itself, or with libASICamera2.

Raspberry PI 4
Find best bandwidth
|---------------------------------------------------------------------------------------------------------------------------------|
| BW [%] |                                            Frame duration [ms]                                                         |
|---------------------------------------------------------------------------------------------------------------------------------|
|   40%  |  299   189    68    82    82    82    82    82    87    82    82    82    82    82    82    82    82    82    82    82 |
|   45%  |   61    73    73    72    73    73    73    72    73    73    73    73    73    73    73    73    73    73    73    73 |
|   50%  |   54    65    61    69    65    61    71    65    61    69    65    62    69    66    65    65    65    65    65    65 |
|   55%  |   48    59    55    59    64    59    59    55    59    64    59    59    54    60    64    59    59    59    59    55 |
|   60%  |   43    58    53    52    58    55    51    55    58    55    52    55    57    54    52    56    56    54    55    52 |
|   65%  |   40    50    50    53    50    48    50    53    50    47    50    53    50    48    50    53    50    48    50    53 |
|   70%  |   34    44    47    47    47    47    47    47    47    47    47    47    47    47    47    47    47    47    47    47 |
|   75%  |   31    44    44    44    43    44    44    44    44    44    43    44    43    44    44    44    44    44    43    44 |
|   80%  |   28    41    41    41    41    41    41    41    41    41    41    41    41    41    41    41    41    41    41    41 |
|   85%  |   24    38    38    38    38    38    38    38    38    38    38    38    38    38    38    38    38    38    38    38 |
|   90%  |   22    36    36    36    36    36    36    36    36    36    36    36    36    36    36    36    36    36    36    36 |
|   95%  |   21    35  1872   587   588   586   585   585   583   588    96    38   587   588   585  1103  1102  1102   582   587 |
|  100%  |  574  1080  1077   590  1083  1080  1077   591  1082  1080  1077   592  1081  1080  1077   592  1080  1080  1078   591 |
|---------------------------------------------------------------------------------------------------------------------------------|

Best bandwidth is 90%, it has 28.1 FPS
When I set HighSpeedMode to 1, the FPS are below 5 ...


Sample result on thinkpad.
$ asitest HighSpeedMode 0
Camera Found!

|-----------------------------------------------------------|
|        Parameter       |     Value                        |
|-----------------------------------------------------------|
| Name                   | ZWO ASI178MM                     |
| Camera Id              | 0                                |
| Max Height             | 2080                             |
| Max Width              | 3096                             |
| Is Color               | no                               |
| Bayer Pattern          | RG                               |
| Supported Bins         | 1, 2, 3, 4                       |
| Supported Video Format | Raw8, Raw16                      |
| Pixel Size             | 2.4                              |
| Mechanical Shutter     | no                               |
| ST4 Port               | yes                              |
| Is Cooled Camera       | no                               |
| Is USB3 Host           | yes                              |
| Is USB3 Camera         | yes                              |
| Elec Per Adu           | 0.916                            |
| Bit Depth              | 14                               |
| Is Trigger Camera      | no                               |
|-----------------------------------------------------------|

Set 'HighSpeedMode' to 0

Camera Options
|------------------------------------------------------------------------------------------------------------------------------|
|        Option  Name      |  Value |   Min  |     Max    | Default  | Auto |                Description                       |
|------------------------------------------------------------------------------------------------------------------------------|
| Gain                     | 0      | 0      | 510        | 210      | no   | Gain                                             |
| Exposure                 | 1000   | 32     | 2000000000 | 10000    | no   | Exposure Time(us)                                |
| Offset                   | 10     | 0      | 600        | 10       | no   | offset                                           |
| BandWidth                | 95     | 40     | 100        | 50       | no   | The total data transfer rate percentage          |
| Flip                     | 0      | 0      | 3          | 0        | no   | Flip: 0->None 1->Horiz 2->Vert 3->Both           |
| AutoExpMaxGain           | 255    | 0      | 510        | 255      | no   | Auto exposure maximum gain value                 |
| AutoExpMaxExpMS          | 30000  | 1      | 60000      | 100      | no   | Auto exposure maximum exposure value(unit ms)    |
| AutoExpTargetBrightness  | 100    | 50     | 160        | 100      | no   | Auto exposure target brightness value            |
| HardwareBin              | 0      | 0      | 1          | 0        | no   | Is hardware bin2:0->No 1->Yes                    |
| HighSpeedMode            | 0      | 0      | 1          | 0        | no   | Is high speed mode:0->No 1->Yes                  |
| Temperature              | 357    | -500   | 1000       | 20       | no   | Sensor temperature(degrees Celsius)              |
|------------------------------------------------------------------------------------------------------------------------------|

Find best bandwidth
|---------------------------------------------------------------------------------------------------------------------------------|
| BW [%] |                                            Frame duration [ms]                                                         |
|---------------------------------------------------------------------------------------------------------------------------------|
|   40%  |  389    84    73    84    82    82    82    82    81    83    82    82    82    82    82    82    82    82    82    82 |
|   45%  |   60    73    73    73    71    73    74    71    73    75    73    73    73    73    71    74    73    73    73    73 |
|   50%  |   54    63    67    66    66    65    66    65    66    63    68    65    65    65    65    66    65    64    67    66 |
|   55%  |   50    57    61    59    62    56    60    59    59    59    59    60    60    59    59    59    59    59    59    59 |
|   60%  |   42    53    56    55    54    54    55    55    54    54    55    52    56    55    54    54    55    54    55    54 |
|   65%  |   37    50    52    50    52    50    50    50    50    50    49    51    50    50    50    50    50    50    49    52 |
|   70%  |   35    47    45    47    47    47    48    49    47    42    48    43    47    49    47    47    48    48    47    43 |
|   75%  |   31    50    38    46    46    39    47    40    46    46    39    46    46    37    45    43    46    45    39    47 |
|   80%  |   25    42    45    40    37    45    35    41    44    43    37    38    47    39    39    39    49    33    39    41 |
|   85%  |   28    43    36    38    43    36    36    42    36    37    41    39    38    38    38    36    38    45    36    36 |
|   90%  |   21    40    39    34    35    37    38    35    38    35    35    38    39    36    35    35    36    38    35    33 |
|   95%  |   22    36    36    34    33    33    38    36    35    34    36    31    29    37    32    37    36    35    35    34 |
|  100%  |   15    35    37    31    34    30    34    32    35    34    32    33    32    33    32    34    32    33    33    33 |
|---------------------------------------------------------------------------------------------------------------------------------|

Best bandwidth is 100%, it has 31.1 FPS

$ asitest HighSpeedMode 1
Camera Found!

...

Set 'HighSpeedMode' to 1

Camera Options
|------------------------------------------------------------------------------------------------------------------------------|
|        Option  Name      |  Value |   Min  |     Max    | Default  | Auto |                Description                       |
|------------------------------------------------------------------------------------------------------------------------------|
| Gain                     | 0      | 0      | 510        | 210      | no   | Gain                                             |
| Exposure                 | 1000   | 32     | 2000000000 | 10000    | no   | Exposure Time(us)                                |
| Offset                   | 10     | 0      | 600        | 10       | no   | offset                                           |
| BandWidth                | 100    | 40     | 100        | 50       | no   | The total data transfer rate percentage          |
| Flip                     | 0      | 0      | 3          | 0        | no   | Flip: 0->None 1->Horiz 2->Vert 3->Both           |
| AutoExpMaxGain           | 255    | 0      | 510        | 255      | no   | Auto exposure maximum gain value                 |
| AutoExpMaxExpMS          | 30000  | 1      | 60000      | 100      | no   | Auto exposure maximum exposure value(unit ms)    |
| AutoExpTargetBrightness  | 100    | 50     | 160        | 100      | no   | Auto exposure target brightness value            |
| HardwareBin              | 0      | 0      | 1          | 0        | no   | Is hardware bin2:0->No 1->Yes                    |
| HighSpeedMode            | 1      | 0      | 1          | 0        | no   | Is high speed mode:0->No 1->Yes                  |
| Temperature              | 363    | -500   | 1000       | 20       | no   | Sensor temperature(degrees Celsius)              |
|------------------------------------------------------------------------------------------------------------------------------|

Find best bandwidth
|---------------------------------------------------------------------------------------------------------------------------------|
| BW [%] |                                            Frame duration [ms]                                                         |
|---------------------------------------------------------------------------------------------------------------------------------|
|   40%  |  312    36    42    47    37    45    37    47    38    44    37    47    37    49    40    33    44    47    37    46 |
|   45%  |   20    45    37    35    35    37    40    29    37    39    37    42    36    35    37    40    37    35    36    38 |
|   50%  |   18    36    37    29    36    34    33    34    33    33    33    34    32    35    32    30    35    29    39    33 |
|   55%  |   12    35    32    30    27    32    34    30    31    30    25    32    34    30    26    32    28    30    33    32 |
|   60%  |   10    30    26    28    33    27    28    23    29    31    26    29    30    23    30    28    29    26    30    28 |
|   65%  |    7    34    22    23    25    28    24    29    27    21    26    26    26    25    29    26    21    26    25    29 |
|   70%  |    4    27    27    22    23    22    24    24    25    22    24    24    24    27    21    26    23    24    23    24 |
|   75%  |    4    29    19    21    21    23    25    22    22    22    23    24    23    23    22    22    20    25    21    22 |
|   80%  |    9    17    21    20    20    21    22    22    21    22    21    19    18    23    19    22    21    21    19    22 |
|   85%  |    7    21    21    19    19    17    19    20    18    20    20    21    18    21    20    19    21    21    16    19 |
|   90%  |    8    20    17    21    20    16    16    19    20    18    20    20    18    20    15    16    20    18    21    20 |
|   95%  |    6    16   641    21    15    24    18    14    15    21    15    18    18    15    19    16    20    17    15    20 |
|  100%  |    5    16    13    15    18    18    13    18    16    19    18    13    18    17    16    19    16    15    16    19 |
|---------------------------------------------------------------------------------------------------------------------------------|

Best bandwidth is 100%, it has 63.1 FPS

I am happy to take some helpful tips.
Are libASICamera2 sources available?

Now I'm starting to parse USB packets in Wireshark to restore libASICamera2 sources.
The following user(s) said Thank You knro, Herrhausen, El Corazon

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

2 months 1 week ago
knro
Administrator
Administrator
Posts: 8745
Karma: 51
ASI178 Camera Performance on Rasperry PI 4 #62719
Bravo Pawel, great analysis indeed.

Btw, for those who do not know already, Pawel recently submitted a Pull-Request to upstream INDI to fix a few INDI streaming and recording issues. Now the results are even better than before with little overhead!

Moving on to libASICameras2, this is a proprietery library from ZWO so no sources available. One possible hint could be in the udev rule file that has this:
ACTION=="add", ATTR{idVendor}=="03c3", RUN+="/bin/sh -c '/bin/echo 256 >/sys/module/usbcore/parameters/usbfs_memory_mb'"

Maybe 256MB doesn't cut it anymore? should be be more dynamic based on the available max RAM perhaps? I'm not sure if this would affect any USB bulk transfers.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

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

2 months 1 week ago
pawel-soja
New Member
New Member
Posts: 12
Karma: 5
More
Topic Author
ASI178 Camera Performance on Rasperry PI 4 #62724
Thanks for the introduction.
Sure, I tried to increase the memory to 256MB and 1024MB.
I tested it on a pure Raspberry Pi OS (32-bit) Lite and on Astroberry (btw sweet ;) )
It made no difference.

I used to deal with driver optimization in the USB2.0 era. In fact, unjustified shortcuts were used so as not to overload the CPU, which actually made things worse.
It scares me that today's so efficient computers have a problem with such basic communication.
Recently, I became interested in telescopes and astrophotography. In my free time (if my daughter allows me ;) ) I would like to be active in this extensive topic.

I think direct communication (without zwo drivers) with the camera will reveal where the problem lies. Work in progress.

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

1 month 3 weeks ago
pawel-soja
New Member
New Member
Posts: 12
Karma: 5
More
Topic Author
ASI178 Camera Performance on Rasperry PI 4 #63624
Anyone interested in this topic?
Is the subject of Raspberry PI still not popular in astrophotography with high-speed cameras?

Over the past weeks, I have analyzed a large part of the LibASICamera2.a library. The most important classes of CCameraFX3 and CircBuf have not been properly implemented for their intended purpose.
For example, the startAsyncXfer method sets up bulk transfers to usb, and then waits for them to be processed, without preparing any more transfers. Then the data is copied in the CircBuf class.
The authors used asynchronous libusb functions to create synchronous communication.

Initial tests of the wrapped library showed that I was able to achieve the full throughput (60fps) without any problems.

My suggestion is to write an overlay to the library to provide asynchronous communication and queuing of buffer pointers,
as well as the new ASIGetVideoDataPointer function to get a data buffer without duplicating data unnecessarily.
Possibility to monitor the size of the queue so that the data from usb up to processing is in the same buffer (streammanager class in Indi).
I also think it is possible to be compatible with new libAsiCamera2 releases.
The following user(s) said Thank You knro, Herrhausen, xsnrg

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

1 month 3 weeks ago
PDB
Elite Member
Elite Member
Posts: 160
More
ASI178 Camera Performance on Rasperry PI 4 #63625
Pawel,

this is interesting stuff and you are doing a great job. I have never got this camera to work properly on Linux systems (even the big ones). That's why I still need a W10 box for Solar work (high frame rate/16bit). On the same computer (AMD 1500, USB3.1 under W10 it works without any glitch, but had to get rid of W10-2004) If on the same hardware I run a 64bit Ubuntu mate, lots of errors and dropped frames. (Usuallt error 11 from the ASi libs under firecapture) If I drop the the USB limit to 80 it gets better, but in 16bit capture I don't get the same performance as in W10.

If you have a solution for that, it would be very helpfull getting rid of microsoft. (Maybe if you have a solution you should contact Sam at ZWO)

Regards,

Paul

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

1 month 3 weeks ago
knro
Administrator
Administrator
Posts: 8745
Karma: 51
ASI178 Camera Performance on Rasperry PI 4 #63627

pawel-soja wrote: Anyone interested in this topic?
Is the subject of Raspberry PI still not popular in astrophotography with high-speed cameras?

Over the past weeks, I have analyzed a large part of the LibASICamera2.a library. The most important classes of CCameraFX3 and CircBuf have not been properly implemented for their intended purpose.
For example, the startAsyncXfer method sets up bulk transfers to usb, and then waits for them to be processed, without preparing any more transfers. Then the data is copied in the CircBuf class.
The authors used asynchronous libusb functions to create synchronous communication.

Initial tests of the wrapped library showed that I was able to achieve the full throughput (60fps) without any problems.

My suggestion is to write an overlay to the library to provide asynchronous communication and queuing of buffer pointers,
as well as the new ASIGetVideoDataPointer function to get a data buffer without duplicating data unnecessarily.
Possibility to monitor the size of the queue so that the data from usb up to processing is in the same buffer (streammanager class in Indi).
I also think it is possible to be compatible with new libAsiCamera2 releases.


That's extremely promising results Pawel! I also agree with Paul that this should also be communicated back to Sam to see if they can improve it on their end. Nevertheless, it would great to try this out. How can we test this now?

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

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

1 month 3 weeks ago 1 month 3 weeks ago by pawel-soja. Reason: fix formatting
pawel-soja
New Member
New Member
Posts: 12
Karma: 5
More
Topic Author
ASI178 Camera Performance on Rasperry PI 4 #63670
Currently, the library wrapper is intended to verify proof of concept on the ARMV8 architecture and ASI178M camera.
Now I'm trying to unify the library for each camera and architecture. Additionally, I have to get rid of one more redundant copy in the GetImage method.

Without library sources, I have a lot of work to do decompiling and creating new code to be easily injected.

Main issues of the library from ZWO:
  • synchronous USB communication.
  • incorrectly handled communication errors - one error causes an avalanche of errors.
  • too much data copying (3x per frame).
  • I suspect the inability to run several cameras on the same instance of the library (common static variable)

On Raspberry PI, the biggest problem is data copying.
The copying speed is ~ 1400 - 2000 MB / s.
The original library does 3 copies per frame + a copy in libusb from USB.
$ make && ./asitest Exposure 10000 HighSpeedMode 1 BandWidth 100 Gain 100
g++ -o asitest main.cpp -I./libasi/include -I./ -lpthread -lusb-1.0 ./libasi/lib/armv8/libASICamera2.a -Wl,--wrap=memcpy -O2
Set 'Exposure' is 10000
Set 'HighSpeedMode' is 1
Set 'BandWidth' is 100
Set 'Gain' is 100
[!!!] Big copy detected: 6439680 Bytes
[!!!] Big copy detected: 6439680 Bytes
[!!!] Big copy detected: 6439680 Bytes
timeframe:   280ms                                 <--- issue
[!!!] Big copy detected: 6439680 Bytes
[!!!] Big copy detected: 6439680 Bytes
[!!!] Big copy detected: 6439680 Bytes
timeframe:   546ms                                 <--- issue
[!!!] Big copy detected: 6439680 Bytes
[!!!] Big copy detected: 6439680 Bytes
[!!!] Big copy detected: 6439680 Bytes
timeframe:   546ms                                 <--- issue

For a 6MB frame, at 60fps this is 6MB * 4 * 60 = 1440MB/s

Speed ​​test for Raspberry PI 4 (64bit userland)
$ ./ramspeed 6
std::vector, size: 6 MB, copy: 0.0043 s, speed: 1396.592 MBps
std::vector, size: 6 MB, copy: 0.0042 s, speed: 1416.900 MBps
memcpy, size: 6 MB, copy: 0.0039 s, speed: 1544.185 MBps
memcpy, size: 6 MB, copy: 0.0039 s, speed: 1546.861 MBps

$ ./ramspeed 6
std::vector, size: 6 MB, copy: 0.0025 s, speed: 2403.668 MBps
std::vector, size: 6 MB, copy: 0.0025 s, speed: 2409.675 MBps
memcpy, size: 6 MB, copy: 0.0025 s, speed: 2374.098 MBps
memcpy, size: 6 MB, copy: 0.0025 s, speed: 2378.751 MBps

A large number of copies causes the loss of data from the USB.
Each frame in my case consists of 7 transfers (bulk). If one of them is "damaged" the library cannot handle it in an elegant way.
Apart from the fact that there is no copy space in other programs or on the system.

I think in 2 weeks, I will be able to publish my work.
I still had to eliminate one copy per frame and a lot of tests.
./asitest-boost Exposure 10000 HighSpeedMode 1 BandWidth 100 Gain 100
[ASIOpenCamera]: grab CameraID 0
[libusb_open]: grab libusb_device_handle 0x559d731cd0
[CCameraBase::InitVariable]: grab CCameraBase 0x559d73c9b0
[CirBuf::CirBuf]: link CirBuf 0x559d73afe0 and CCameraBase 0x559d73c9b0
[CirBuf::CirBuf]: link CCameraBase 0x559d73c9b0 and libusb_device_handle 0x559d731cd0
[CirBuf::CirBuf]: link iCameraID 0 and CCameraBase 0x559d73c9b0
Set 'Exposure' to 10000
Set 'HighSpeedMode' to 1
Set 'BandWidth' to 100
Set 'Gain' to 100
[CameraBoost::CameraBoost]: created
[CCameraFX3::initAsyncXfer]: init CameraBoost device 0x559d731cd0, endpoint 0x81, buffer size 6439680
[CirBuf::ReadBuff]: 1 1 0x7f7e85f010
[!!!] Big copy detected: 6439680 Bytes
timeframe:   261ms                       <---- warming up
[CirBuf::ReadBuff]: 2 2 0x7f7c15a010
[!!!] Big copy detected: 6439680 Bytes
timeframe:    16ms                        <---- yeah!
[CirBuf::ReadBuff]: 3 3 0x7f778ff010
[!!!] Big copy detected: 6439680 Bytes
timeframe:    17ms                        <---- yeah!
[CirBuf::ReadBuff]: 4 4 0x7f771fe010
[!!!] Big copy detected: 6439680 Bytes
timeframe:    17ms                        <---- yeah!
[CirBuf::ReadBuff]: 5 5 0x7f7c15a010
[!!!] Big copy detected: 6439680 Bytes
timeframe:    16ms                        <---- yeah!
[CirBuf::ReadBuff]: 6 6 0x7f778ff010
[!!!] Big copy detected: 6439680 Bytes
timeframe:    16ms                        <---- yeah! 60 fps
....

By queuing buffers and passing pointers, there will also be some work with the Indi library to take advantage of the new possibilities.
I will also add the ability to restore the original behavior of the library, without the need to compile or replace files.
The following user(s) said Thank You knro, Herrhausen, xsnrg, Lead_weight

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

1 month 3 weeks ago
knro
Administrator
Administrator
Posts: 8745
Karma: 51
ASI178 Camera Performance on Rasperry PI 4 #63723
This is simply stunning. It takes great in depth knowledge to analyze a binary blob. Looking forward to the updated interface to test!

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

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

1 month 1 week ago
pawel-soja
New Member
New Member
Posts: 12
Karma: 5
More
Topic Author
ASI178 Camera Performance on Rasperry PI 4 #64219
Hi!

I uploaded the first version on github.
The library still requires a lot of cosmetic work, but it can already be pre-tested.

github.com/pawel-soja/AsiCamera

Currently I only have one camera and it's hard for me to test everything.
I am asking you for tests on your cameras. Share the information you have cameras by attaching information from the AsiCameraPerformance program.

Below is a detailed description of how I tested the camera.
  • download Raspberry Pi OS Lite (Release date: December 2nd 2020, Kernel version: 5.4)
  • enable ssh by placing an empty "ssh" file in the /boot/ directory
  • run Raspberry PI 4
  • connect ethernet cable and login via ssh
  • install pre-requisites from "Install Pre-requisites" section
  • build project from "Get the code and build" section
  • copy udev rule:
    sudo cp ~/Projects/AsiCamera/libasicamera2/lib/asi.rules /etc/udev/rules.d/
  • connect camera to USB 3.0
  • run AsiCameraPerformance
    ./example/performance/AsiCameraPerformance Exposure 10000 HighSpeedMode 1 Gain 100

Of course you can test it on different hardware or operating system and skip a few steps if you know what you are doing.

If something went wrong, run:
./example/simply/AsiCameraSimply Exposure 10000 HighSpeedMode 1 Gain 100
And then post the program result as a text attachment on the forum.

If someone has problems getting through the testing procedure, I can prepare a simple script to do everything for you.

I expect problems for cameras with resolutions above 10MPixel and color cameras. Please confirm.

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

1 month 1 week ago
PDB
Elite Member
Elite Member
Posts: 160
More
ASI178 Camera Performance on Rasperry PI 4 #64221
Thank you pawel. I quickly compiled it on my desktop intel, and tested without problems. (in highspeed mode just a bit faster than firecaptur) Will do the test on an RPI4 later today.

Just one question: is there a possibility to set the camera to 16 bit? That is on my desktop machine I see the biggest problems.

Paul

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

1 month 1 week ago
PDB
Elite Member
Elite Member
Posts: 160
More
ASI178 Camera Performance on Rasperry PI 4 #64223
Hi,

tested ASI178MM and ASI120MM-S on Rpi4 Ubuntu 20.04 64bit

logs attached. Both cams seem to get their target speed. ASI120 in high speed just a tad faster than in Ekos/Indi

Paul
Attachments:

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

1 month 1 week ago
pawel-soja
New Member
New Member
Posts: 12
Karma: 5
More
Topic Author
ASI178 Camera Performance on Rasperry PI 4 #64232

PDB wrote: Thank you pawel. I quickly compiled it on my desktop intel, and tested without problems. (in highspeed mode just a bit faster than firecaptur) Will do the test on an RPI4 later today.

Just one question: is there a possibility to set the camera to 16 bit? That is on my desktop machine I see the biggest problems.

Paul


The library supports 16-bit resolution. I added the "Format" parameter to the programs.
On RPi in 16-bit mode, frames are lost a bit.
I need to do some size adjustments for buffers and transfers to get reliable communication.
I prepared a "16-bit" branch.
Branch "16-bit" is not good for 8-bit mode.

As for me, it looks better:
./example/simply/AsiCameraSimply Exposure 10000 HighSpeedMode 1 Gain 100 Format 16bit
[ASIOpenCamera]: grab CameraID 0
[CameraBoost]: created
[__wrap_libusb_open]: grab libusb_device_handle 0x1f9d338
[__wrap__ZN11CCameraBase12InitVariableEv]: grab CCameraBase 0x1f9f670
Set 'Exposure' to 10000
Set 'HighSpeedMode' to 1
Set 'Gain' to 100
Set 'Format' to 16bit
...
timeframe:  1000ms, status: 11
timeframe:   148ms, status: 0
timeframe:    51ms, status: 0
...
timeframe:    33ms, status: 0
timeframe:    34ms, status: 0
timeframe:    33ms, status: 0
timeframe:    33ms, status: 0
timeframe:    33ms, status: 0
timeframe:    34ms, status: 0
...
[releaseAsyncXfer]: catched

For the ASI178MM camera, the maximum frame rate is reached.
|---------------------------------------------------------------------------------------------------------------------------------|
| BW [%] |                                            Frame duration [ms]                                                         |
|---------------------------------------------------------------------------------------------------------------------------------|
|  100%  |   16    27    33    33    33    34    33    33    33    34    33    33    33    33    33    33    33    34    33    33 |
|---------------------------------------------------------------------------------------------------------------------------------|

Best bandwidth is 100%, it has 30.4 FPS

Is it the same for you?

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

Moderators: Kaczorek
Time to create page: 0.961 seconds