×
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 2 weeks ago
pawel-soja
New Member
New Member
Posts: 12
Karma: 5
More
Topic Author
ASI178 Camera Performance on Rasperry PI 4 #62717
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.

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

2 months 2 weeks ago
pawel-soja
New Member
New Member
Posts: 12
Karma: 5
More
Topic Author
ASI178 Camera Performance on Rasperry PI 4 #62725
Sorry for the duplicate. Please delete the topic.

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

Moderators: Kaczorek
Time to create page: 0.681 seconds