- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
this is after I adjust for the resolution ratio.
ratio_x = RS_Camera.DEPTH_CAMERA_WIDTH / RS_Camera.COLOR_CAMERA_WIDTH
pt_x = int(point[0] * ratio_x)
ratio_y = RS_Camera.DEPTH_CAMERA_HEIGHT / RS_Camera.COLOR_CAMERA_HEIGHT
pt_y = int(point[1] * ratio_x)
#---------------------------------------------------
dist = self.depth_frame.get_distance(pt_x, pt_y)
#---------------------------------------------------
closest posting I found is https://forums.intel.com/s/question/0D70P0000068Zh9SAE but it did not address my specific issue.
- Tags:
- Let
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi MartyG, I found the issue... it is that I was aligning the color and depth frames ....I guess two unequal resolutions can't be aligned ??? when I dropped the aligning and did straight
self.depth_frame = frames.get_depth_frame()
self.color_frame = frames.get_color_frame()
it worked!
### caused incorrect depths reporting
#Let's align the color frame with the depth frame
align_to = rs.stream.color
self.align = rs.align(align_to)
aligned_frames = self.align.process(frames)
self.depth_frame = aligned_frames.get_depth_frame()
self.color_frame = aligned_frames.get_color_frame()
curious to hear your opinion on whether this behavior is expected...
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Since the date of the linked-to message, there have been five newer firmware releases. 5.10.3 should work well, but you will not be getting the benefit of fixes and features added to the firmware since then.
Could you tell us more please about what you are aiming to do with your code. Is it that you wish to adjust the depth resolution to 1920x1080 so it matches the color resolution?
If this is the case, the Chief Technical Officer of the RealSense Group gave this advice to somebody who wanted to do this:
https://github.com/IntelRealSense/librealsense/issues/1370#issuecomment-373388889
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Sure. I am using the D415 for a Tailgating and access control solution ... I need to use 1920x1080 for color images in order to detect people and faces from a few meters away... I use the depths to ascertain if a person is of interest to me ... when I use 1280x720 for both color image and IR then all works well. I identify the pixels I need depths for and I get them ... when my color image is 1920x1080 , after calculating the pixels' locations on 1280x720 I get incorrect values... what I am interested in is finding a way to measure the distance to a face represented as a rectangle in 1920x1080 color image ... I expected that when I calculate the location of the rectangle on 1280x720 then I should be able to get distances for any point inside this rectangle... Thx. look forward to your response.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The requirements of your application sound similar to that of a Deep Neural Network (DNN). It is trained to recognize a particular kind of object (e.g a 'person') from the RGB image, and then the depth frame is used to provide a depth reading for that recognized object within the boundary of a rectangle.
Below are a couple of examples of DNNs for the 400 Series cameras.
https://github.com/twMr7/rscvdnn
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv/dnn
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Thank you for the quick response and the links... I checked and the one thing that I need is an example showing color image at 1920x1080 and able to get depth of object after translating coordinates to 1280x720 ... I will continue checking and debugging until I hear from you.... If I find something I will surely let you know..
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi MartyG, I found the issue... it is that I was aligning the color and depth frames ....I guess two unequal resolutions can't be aligned ??? when I dropped the aligning and did straight
self.depth_frame = frames.get_depth_frame()
self.color_frame = frames.get_color_frame()
it worked!
### caused incorrect depths reporting
#Let's align the color frame with the depth frame
align_to = rs.stream.color
self.align = rs.align(align_to)
aligned_frames = self.align.process(frames)
self.depth_frame = aligned_frames.get_depth_frame()
self.color_frame = aligned_frames.get_color_frame()
curious to hear your opinion on whether this behavior is expected...
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Great news that you found a solution!
Dorodnic the RealSense SDK Manager recently gave advice to someone else who was asking about whether it was okay for depth and color to have different resolutions when doing alignment: "There is no strict dependency between RGB and Depth resolutions in general. Please note that Depth and IR must be equal (because depth is generated from IR".

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite