Dual-Fisheye image using USB API

@Siwook_Choi ,
I’m finalizing a plugin update, it provides high quality live streaming, but trying to cover multiple use cases and requirements where this plugin could be used in theory. this is one test I did through mobile device network: Theta Z1 - Best live streaming 360 camera? - YouTube . In theory I’ve full control over FPS, etc.

A person is moving around with the Z1 in your case or a “robot” and need to take shots and save locally to internal storage of Z1? after those images are processed, etc.? I could make my plugin record video also to local in 5fps, but if you have a local media server to ingest rtmp or rtsp or low latency SRT , it will work, I’m not sure what do you do further in PC or raspberry with the input?

2 Likes

Be careful with the actual deployment workflow. Even if you get it working on your development workstation, test the following:

  • do you need this to work on unlocked Z1 cameras in the future?
  • did you have to press some type of “USB authorization” screen on Vysor?

Think through whether the approach will work for your production use case.

As far as the dual-fisheye JPG image over USB connection, I reviewed your request with a manager at RICOH.

As the real voice of the community with the use case is very powerful, they are considering implementing this feature. However, it may take a long time. I know of another company that has a similar request with the USB API for similar reasons.

If you are considering a large deployment of Z1 cameras, please contact @jcasman, president of Oppkey and manager of .guide, by DM or email as we can send the information to RICOH as it may help to influence their management decisions.

In parallel, I suggest you consider independent community developer @biviel plug-in as he’s a good developer with good knowledge of the Z1 technology and media encoding.

Maybe you and @biviel from FlowTours can talk privately over video conference as community member to community member to exchange technical ideas?

Note:

  • Oppkey and @jcasman have a business relationship with RICOH and meet with RICOH management regularly
  • @biviel is a community developer that is not under contract with RICOH
2 Likes

Hi @biviel, I’ve sent you a DM. Thank you!

Indeed, the forwarding requires unlocked cameras which cannot be used for the deployment.
What I’m doing now is a feasibility testing, and if it seems okay, I should develop a plug-in as you suggested.

1 Like

@biviel @craig
Thank you! I really appreciate your help.

You can access the webapi from within the plug-in, either directly or using something like theta4j.

This article is old, but it may still work.

In the current plug-in architecture with the Z1, you cannot access the USB port from the plug-in. You would need to use the camera itself to transfer the images to your cloud or you can stop the plug-in and then use the USB interface to transfer it to a small computer.

I believe that you can start and stop the plug-in from the USB API, but I have not tried.

Notice of website closure

Your app can use this to see if the plug-in is running or not:

Notice of website closure

1 Like

FYI, this feature added in latest Z1 firmware update(ver 2.10.3 - released 2022-05-31).
documentation about this feature is not updated yet (0xD834 Image Stitching).

2 Likes

Thanks for the report!

@dhp,
are you sure it works for Z1? At support models I see “-” at Z1:

Did you test this, if yes how?

thanks!

I believe he indicated that he tested the Z1, but that the API documentation was not yet updated. I haven’t tested it myself yet.

@craig yes, i’ve tested z1

@biviel following commands (gphoto2 on ubuntu) will take 2 photo with different stitching mode

root@teevr-NucBox5:~# gphoto2 --get-config=/main/other/d834
Label: PTP Property 0xd834                                                     
Readonly: 0
Type: MENU
Current: 1
Choice: 0 1
Choice: 1 2
Choice: 2 3
Choice: 3 4
Choice: 4 6
Choice: 5 7
END
root@teevr-NucBox5:~# gphoto2 --trigger-capture
root@teevr-NucBox5:~# gphoto2 --set-config /main/other/d834=2                
root@teevr-NucBox5:~# gphoto2 --trigger-capture
2 Likes

Thanks for sharing! Where are you doing stitching why do you need dualfisheye. May I ask your use case?

Do you know if taking a picture with the USB API without stitching results in faster time between images?

I have seen this requirement before for image overlays on sensor data.

verified this works with ptpcam

set to no-stitching (dual-fisheye)

ptpcam --set-property=0xd834 --val=0x0002

Camera: RICOH THETA Z1
'UNKNOWN' is set to: 0x0001 (1)
Changing property value to 0x0002 [(null)] succeeded.

ptpcam --capture

Initiating capture...
Object added 0x00000018
Capture completed successfully!

image

 ptpcam --set-property=0xd834 --val=0x0001

Camera: RICOH THETA Z1
'UNKNOWN' is set to: 0x0001 (1)
Changing property value to 0x0001 [(null)] succeeded.

ptpcam --capture

Initiating capture...
Object added 0x00000019
Capture completed successfully!

image

Camera Firmware Info

Z1 2.10.3

ptpcam --info

THETA Device Info
==================
Model: RICOH THETA Z1
  manufacturer: Ricoh Company, Ltd.

  device version: 2.10.3
  extension ID: 0x00000006
  image formats supported: 0x00000005
  extension version: 0x006e

Static Stitching

Appears to work

theta --set-property=0xd834 --val=0x0003

Camera: RICOH THETA Z1
'UNKNOWN' is set to: 0x0001 (1)
Changing property value to 0x0003 [(null)] succeeded.
craig@jetson:~/Documents/tools$ theta --capture

Initiating capture...
Object added 0x0000001b
Capture completed successfully!

oh, i’m working for the same project as Siwook_Choi.
we need fast still image capture (with or without stitching).

1 Like

What is the time between images for unstitched images on the Z1 when you use the USB API?
I’m assuming this is JPEG, 6720x3360

@biviel I’ve seen “time reduction” requirement many times before. People are trying to save even 0.5 seconds on the time between images because they take thousands of images. I’m curious as to how fast they can take it with the USB API.

1 Like

with stitching 0.294 image/sec and without stiching 0.367 image/sec.
we do not download image, just trigger and store images in camera.

log w/ stitching:

teevr@teevr-NucBox5:~$ rostopic hz /photo/shooting
subscribed to [/photo/shooting]
no new messages
average rate: 0.293
        min: 3.413s max: 3.413s std dev: 0.00000s window: 2
no new messages
no new messages
average rate: 0.293
        min: 3.402s max: 3.413s std dev: 0.00533s window: 3
no new messages
no new messages
no new messages
average rate: 0.292
        min: 3.402s max: 3.472s std dev: 0.03067s window: 4
no new messages
no new messages
average rate: 0.294
        min: 3.318s max: 3.472s std dev: 0.05472s window: 5
no new messages
no new messages
no new messages
average rate: 0.294
        min: 3.318s max: 3.472s std dev: 0.04917s window: 6
no new messages
no new messages
average rate: 0.294
        min: 3.318s max: 3.472s std dev: 0.04519s window: 7
no new messages
no new messages
average rate: 0.294
        min: 3.318s max: 3.472s std dev: 0.04232s window: 8

log w/o stitching:

teevr@teevr-NucBox5:~$ rostopic hz /photo/shooting
verage rate: 0.405
        min: 2.472s max: 2.472s std dev: 0.00000s window: 2
no new messages
no new messages
average rate: 0.389
        min: 2.472s max: 2.675s std dev: 0.10161s window: 3
no new messages
no new messages
average rate: 0.383
        min: 2.472s max: 2.685s std dev: 0.09815s window: 4
no new messages
average rate: 0.379
        min: 2.472s max: 2.712s std dev: 0.09557s window: 5
no new messages
no new messages
average rate: 0.371
        min: 2.472s max: 2.936s std dev: 0.14740s window: 6
no new messages
no new messages
average rate: 0.370
        min: 2.472s max: 2.936s std dev: 0.13516s window: 7
no new messages
no new messages
average rate: 0.367
        min: 2.472s max: 2.936s std dev: 0.13422s window: 8
2 Likes

thank you again for your help. the documentation is now updated to show support for the Z1.

https://api.ricoh/docs/theta-usb-api/property/image_stitching/

1 Like

I think ‘X’ is a typo. we are talking about the Z1 model here.

1 Like

Thanks! I updated my last post. :slight_smile: Appreciate the help.