<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: D435 stops sending images when using opencv in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679697#M15867</link>
    <description>&lt;P&gt;Solved the problem by using the sdk.&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2019 15:29:11 GMT</pubDate>
    <dc:creator>JKjel1</dc:creator>
    <dc:date>2019-05-10T15:29:11Z</dc:date>
    <item>
      <title>D435 stops sending images when using opencv</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679694#M15864</link>
      <description>&lt;P&gt;I'm trying to use the D435 camera to get color images and opencv to work with it. I'm having problems reading the image. This is the python code I'm using:&lt;/P&gt;&lt;CODE&gt;import cv2
&amp;nbsp;
cap = cv2.VideoCapture(6)
while (1==1):
	key=cv2.waitKey(1)
	ret, frame = cap.read()
	if ret:
		cv2.imshow("res",frame)
	if key==ord('q'):
		break
cap.release()
cv2.destroyAllWindows()&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When run the code I get 2 color images which are all green and after those 2 I get the error message: &lt;B&gt;python vidioc_dqbuf resource temporarily unavailable &lt;/B&gt;and no more images.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scrip works with another camera, which isn't a d435. I've tried 2 different D435s and they both give the same faulty responses. When I use the same cameras and same python script on another computer it works. I'm positive the d435 is connected to a usb 3. Any help I can get is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 16:08:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679694#M15864</guid>
      <dc:creator>JKjel1</dc:creator>
      <dc:date>2019-05-03T16:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: D435 stops sending images when using opencv</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679695#M15865</link>
      <description>Hello JKjel1,

Thank you for your interest in the Intel RealSense D435 camera.

I am unable to run this code. Could you please perhaps attach the source file in order for us to test it? 

Thank you,
Eliza</description>
      <pubDate>Fri, 03 May 2019 21:55:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679695#M15865</guid>
      <dc:creator>Eliza_D_Intel</dc:creator>
      <dc:date>2019-05-03T21:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: D435 stops sending images when using opencv</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679696#M15866</link>
      <description>Hello JKjel1,

We would like to know if you require further assistance on this topic.

Thank you,
Eliza</description>
      <pubDate>Fri, 10 May 2019 15:03:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679696#M15866</guid>
      <dc:creator>Eliza_D_Intel</dc:creator>
      <dc:date>2019-05-10T15:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: D435 stops sending images when using opencv</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679697#M15867</link>
      <description>&lt;P&gt;Solved the problem by using the sdk.&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 15:29:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679697#M15867</guid>
      <dc:creator>JKjel1</dc:creator>
      <dc:date>2019-05-10T15:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: D435 stops sending images when using opencv</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679698#M15868</link>
      <description>&lt;P&gt;I got the same issues. normally, I can read the realsense camera by opencv. But today, the green color is shown, and ​after 3 times reading the messages is "VIDIOC_DQBUF: Resource temporarily unavailable"&lt;/P&gt;&lt;P&gt;​Code:&lt;/P&gt;&lt;CODE&gt;import cv2
import numpy as np
&amp;nbsp;
# Create a VideoCapture object and read from input file
# If the input is the camera, pass 0 instead of the video file name
cap = cv2.VideoCapture(2)
print('hello')
# Check if camera opened successfully
if (cap.isOpened()== False): 
  print("Error opening video stream or file")
&amp;nbsp;
# Read until video is completed
while(cap.isOpened()):
  # Capture frame-by-frame
  ret, frame = cap.read()
  
  if ret == True:
    print("can reading file")
    # Display the resulting frame
    cv2.imshow('Frame',frame)
&amp;nbsp;
    # Press Q on keyboard to  exit
    if cv2.waitKey(25) &amp;amp; 0xFF == ord('q'):
      break
&amp;nbsp;
  # Break the loop
  else: 
    break
&amp;nbsp;
# When everything done, release the video capture object
cap.release()
&amp;nbsp;
# Closes all the frames
cv2.destroyAllWindows()&lt;/CODE&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Terminal result:&lt;/P&gt;&lt;CODE&gt;hello
&amp;nbsp;
can reading file
&amp;nbsp;
can reading file
&amp;nbsp;
can reading file
&amp;nbsp;
select timeout
&amp;nbsp;
VIDIOC_DQBUF: Resource temporarily unavailable&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;I already test the same code with others computer, it can work. I also change different realsense cameras, but the same results. :( &lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 10:21:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679698#M15868</guid>
      <dc:creator>CDuon</dc:creator>
      <dc:date>2020-06-04T10:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: D435 stops sending images when using opencv</title>
      <link>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679699#M15869</link>
      <description>&lt;P&gt;annyway, the SDk still works. And the code is here. But I really want to figure out the problem in opencv&lt;/P&gt;&lt;CODE&gt;## License: Apache 2.0. See LICENSE file in root directory.
## Copyright(c) 2015-2017 Intel Corporation. All Rights Reserved.
&amp;nbsp;
###############################################
##      Open CV and Numpy integration        ##
###############################################
&amp;nbsp;
import pyrealsense2 as rs
import numpy as np
import cv2
&amp;nbsp;
&amp;nbsp;
cv2.namedWindow('RealSense', cv2.WINDOW_AUTOSIZE)
&amp;nbsp;
# Configure depth and color streams
pipeline = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30)
config.enable_stream(rs.stream.color, 640, 480, rs.format.bgr8, 30)
&amp;nbsp;
# Start streaming
pipeline.start(config)
&amp;nbsp;
try:
    while True:
&amp;nbsp;
        
        # Wait for a coherent pair of frames: depth and color
        frames = pipeline.wait_for_frames()
        depth_frame = frames.get_depth_frame()
        color_frame = frames.get_color_frame()
        if not depth_frame or not color_frame:
            continue
&amp;nbsp;
        # Convert images to numpy arrays
        depth_image = np.asanyarray(depth_frame.get_data())
        color_image = np.asanyarray(color_frame.get_data())
&amp;nbsp;
        # Apply colormap on depth image (image must be converted to 8-bit per pixel first)
        
        scaled_depth=cv2.convertScaleAbs(depth_image, alpha=0.08)
        depth_colormap = cv2.applyColorMap(scaled_depth, cv2.COLORMAP_JET)
&amp;nbsp;
        # Stack both images horizontally
        images = np.hstack((color_image, depth_colormap))
&amp;nbsp;
        # Show images
        cv2.imshow('RealSense', images)
&amp;nbsp;
&amp;nbsp;
        k = cv2.waitKey(1) &amp;amp; 0xFF
        if k == 27:
            break
&amp;nbsp;
finally:
&amp;nbsp;
    # Stop streaming
    pipeline.stop()&lt;/CODE&gt;&lt;P&gt;​References: &lt;A href="http://robotsforroboticists.com/realsense-usage-robotics-slam/" target="_self" alt="http://robotsforroboticists.com/realsense-usage-robotics-slam/"&gt;&lt;/A&gt;&lt;A href="http://robotsforroboticists.com/realsense-usage-robotics-slam/"&gt;http://robotsforroboticists.com/realsense-usage-robotics-slam/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 10:28:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/D435-stops-sending-images-when-using-opencv/m-p/679699#M15869</guid>
      <dc:creator>CDuon</dc:creator>
      <dc:date>2020-06-04T10:28:41Z</dc:date>
    </item>
  </channel>
</rss>

