Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Depth camera window is cropped on some monitors

#1
I'm using RoboDK on a Macbook Air with an external monitor. When I open a depth camera window, the image it shows changes depending on whether the window is on my laptop screen vs my external monitor.

The laptop-screen picture appears to be the lower left corner of the external-monitor picture, resized and cropped. I've included a screenshot of my camera settings and the stl file for the object I'm looking at.

The zoomed-and-cropped image is what shows up if I use the RoboDK Python API to take a snapshot, so this is an API bug, not just a display bug.


Attached Files Thumbnail(s)


.stl 30x50x10.stl(Size: 684 bytes / Downloads: 176)
#2
Hi,

Do you have the same issue if you uncheck the "Allow Window Resize" option?
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
#3
Hi Sam,
Yes, the effect is exactly the same regardless of that option.
#4
I'm unable to reproduce this on Windows using 3 monitors of different resolutions and DPI scaling.

Does the issue persist if you set the DPI scaling on both monitors to 100%?
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
#5
It doesn't change with different monitor scaling.
#6
Can you attach a station with a Python script that reproduce the issue directly?
How are you triggering the issue? Starting/moving RoboDK to the secondary monitor, then starting the script? Moving the preview window while open to the other monitor?
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
#7
(05-24-2022, 12:12 PM)Sam Wrote:Can you attach a station with a Python script that reproduce the issue directly?
How are you triggering the issue? Starting/moving RoboDK to the secondary monitor, then starting the script? Moving the preview window while open to the other monitor?

See my attached station. No Python script necessary; just activate the camera ("Show camera" from dropdown menu), starting RoboDK on the external monitor. Then move the preview window from the external monitor to the laptop monitor while it's open.


Attached Files
.rdk cropped-camera.rdk(Size: 1.32 KB / Downloads: 160)
#8
As a workaround, we added the ability to retrieve the depth map through socket withRoboDK v5.4.3(2022-06-20)及以上。它应该是available on all platforms soon.

Code:
bytes_img = RDK.Cam2D_Snapshot("", cam_item, 'DEPTH')
if isinstance(bytes_img, bytes) and bytes_img != b'':
# By socket
depth32_socket = np.frombuffer(bytes_img, dtype='>u4')
w, h = depth32_socket[:2]
depth32_socket = np.flipud(np.reshape(depth32_socket[2:], (h, w))).astype(np.uint32)
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .




Users browsing this thread:
2 Guest(s)