<?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: Depth map of black pixels in an image is not coming in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354012#M1306</link>
    <description>&lt;P&gt;Causes of an image being black like this can include:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.  The light source in the room is too dark or too bright.  The camera has a component called an IR emitter that assists the IR sensor with exposure, and if the lighting is too low or too high, the emitter can cause the IR sensor to become saturated.  The IR emitter can be turned off with scripting in Librealsense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Enables / disables R200 emitter&lt;/P&gt;&lt;P&gt;     */&lt;/P&gt;&lt;P&gt;    public void setEmitterEnabled(int value) {&lt;/P&gt;&lt;P&gt;        setOption(RealSense.RS_OPTION_R200_EMITTER_ENABLED, value);&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  The 'gain' value may be too low.  Increasing gain can make an image brighter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if you have a problem with depth scans that are too noisy, using a 'point cloud' type of depth scan may yield better results.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2017 12:05:35 GMT</pubDate>
    <dc:creator>MartyG</dc:creator>
    <dc:date>2017-09-14T12:05:35Z</dc:date>
    <item>
      <title>Depth map of black pixels in an image is not coming</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354011#M1305</link>
      <description>&lt;P&gt;Camera Model: SR300&lt;/P&gt;&lt;P&gt;Firmware Version: firmware': '3.21.0.0'&lt;/P&gt;&lt;P&gt;Operating System &amp;amp; Version: macOS sierra 10.12.6&lt;/P&gt;&lt;P&gt;librealsense version: 1.12.1&lt;/P&gt;&lt;P&gt;pyrealsense version: 2.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Required info:&lt;/P&gt;&lt;P&gt;I am trying to get the depth map using intel realsense SR300. However i am not getting the depth map for the black pixels in an image. example: for my hair i am getting 0 value in the depth map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wearing a stripes t-shirt having grey and red colour. Depth map for red stripe is generated however for the grey colour the depth map is not created. How to solve this problem? Even the depth of my hair, beard or anything black is not coming.&lt;/P&gt;&lt;P&gt;&lt;B&gt;CODE:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;import os&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;import sys&lt;P&gt;&amp;nbsp;&lt;/P&gt;import cv2&lt;P&gt;&amp;nbsp;&lt;/P&gt;import pyrealsense as pyrs&lt;P&gt;&amp;nbsp;&lt;/P&gt;import numpy as np&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;def create_directory(directory):&lt;P&gt;&amp;nbsp;&lt;/P&gt;  if not os.path.exists(directory):&lt;P&gt;&amp;nbsp;&lt;/P&gt;  os.makedirs(directory)&lt;P&gt;&amp;nbsp;&lt;/P&gt;  return 1&lt;P&gt;&amp;nbsp;&lt;/P&gt;  else:&lt;P&gt;&amp;nbsp;&lt;/P&gt;  print(directory, '- already exists')&lt;P&gt;&amp;nbsp;&lt;/P&gt;  return 0&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;def check_directories():&lt;P&gt;&amp;nbsp;&lt;/P&gt;  try:&lt;P&gt;&amp;nbsp;&lt;/P&gt;  create_directory('./data')&lt;P&gt;&amp;nbsp;&lt;/P&gt;  create_directory('./data/depth')&lt;P&gt;&amp;nbsp;&lt;/P&gt;  create_directory('./data/color')&lt;P&gt;&amp;nbsp;&lt;/P&gt;  create_directory('./data/cad')&lt;P&gt;&amp;nbsp;&lt;/P&gt;  create_directory('./data/dac')&lt;P&gt;&amp;nbsp;&lt;/P&gt;  except:&lt;P&gt;&amp;nbsp;&lt;/P&gt;  print("Unexpected error:", sys.exc_info()[0])&lt;P&gt;&amp;nbsp;&lt;/P&gt;  return -1&lt;P&gt;&amp;nbsp;&lt;/P&gt;  return 0&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;def main():&lt;P&gt;&amp;nbsp;&lt;/P&gt;  file_structure = check_directories()&lt;P&gt;&amp;nbsp;&lt;/P&gt;  if file_structure == -1:&lt;P&gt;&amp;nbsp;&lt;/P&gt;       print('\nERROR: Directories can\'t be created, error thrown')&lt;P&gt;&amp;nbsp;&lt;/P&gt;       return -1&lt;P&gt;&amp;nbsp;&lt;/P&gt;  else:&lt;P&gt;&amp;nbsp;&lt;/P&gt;       print('\nDirectories created successfully...\nLaunching camera module...')&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  #  Fire camera &amp;amp; launch streams&lt;P&gt;&amp;nbsp;&lt;/P&gt;  serv = pyrs.Service()&lt;P&gt;&amp;nbsp;&lt;/P&gt;  serv.start()&lt;P&gt;&amp;nbsp;&lt;/P&gt;  cam = serv.Device(device_id = 0, streams = [pyrs.stream.ColorStream(fps=10),&lt;P&gt;&amp;nbsp;&lt;/P&gt;                           pyrs.stream.DepthStream(fps=10),&lt;P&gt;&amp;nbsp;&lt;/P&gt;                           pyrs.stream.CADStream(fps=10),&lt;P&gt;&amp;nbsp;&lt;/P&gt;                           pyrs.stream.DACStream(fps=10),&lt;P&gt;&amp;nbsp;&lt;/P&gt;                           pyrs.stream.InfraredStream(fps=10),&lt;P&gt;&amp;nbsp;&lt;/P&gt;                           pyrs.stream.PointStream(fps=10)])&lt;P&gt;&amp;nbsp;&lt;/P&gt;  scale = cam.depth_scale * 1000&lt;P&gt;&amp;nbsp;&lt;/P&gt;  print "scale = ", scale &lt;P&gt;&amp;nbsp;&lt;/P&gt;  #  Some important variables&lt;P&gt;&amp;nbsp;&lt;/P&gt;  flag_save_frames = True&lt;P&gt;&amp;nbsp;&lt;/P&gt;  file_num = 0&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  #  Start fetching Buffer&lt;P&gt;&amp;nbsp;&lt;/P&gt;  print('Starting Buffer...')&lt;P&gt;&amp;nbsp;&lt;/P&gt;  while(True):&lt;P&gt;&amp;nbsp;&lt;/P&gt;       cam.wait_for_frames()&lt;P&gt;&amp;nbsp;&lt;/P&gt;       current_color = cam.color[:,:,::-1]&lt;P&gt;&amp;nbsp;&lt;/P&gt;       #  print current_color.shape&lt;P&gt;&amp;nbsp;&lt;/P&gt;       current_depth = cam.depth * scale&lt;P&gt;&amp;nbsp;&lt;/P&gt;       current_cad = cam.cad[:,:,::-1]&lt;P&gt;&amp;nbsp;&lt;/P&gt;       current_dac = cam.dac * scale&lt;P&gt;&amp;nbsp;&lt;/P&gt;       print "max depth", np.max(current_dac)&lt;P&gt;&amp;nbsp;&lt;/P&gt;       print "print depth val = ",np.max(cam.dac)&lt;P&gt;&amp;nbsp;&lt;/P&gt;   &lt;P&gt;&amp;nbsp;&lt;/P&gt;       cv2.imshow('Color',current_color)&lt;P&gt;&amp;nbsp;&lt;/P&gt;       cv2.imshow('Depth',current_depth/1000)&lt;P&gt;&amp;nbsp;&lt;/P&gt;       cv2.imshow('CAD',current_cad)&lt;P&gt;&amp;nbsp;&lt;/P&gt;       cv2.imshow('DAC',current_dac/1000)&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;   &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;       if flag_save_frames:&lt;P&gt;&amp;nbsp;&lt;/P&gt;            num = format(file_num, '08')&lt;P&gt;&amp;nbsp;&lt;/P&gt;            cv2.imwrite('./data/depth/' + str(num) + '.png', cam.depth)&lt;P&gt;&amp;nbsp;&lt;/P&gt;            cv2.imwrite('./data/color/' + str(num) + '.png', current_color)&lt;P&gt;&amp;nbsp;&lt;/P&gt;            cv2.imwrite('./data/dac/' + str(num) + '.png', cam.dac)&lt;P&gt;&amp;nbsp;&lt;/P&gt;            cv2.imwrite('./data/cad/' + str(num) + '.png', current_cad)&lt;P&gt;&amp;nbsp;&lt;/P&gt;            file_num += 1&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;       k = cv2.waitKey(1)&lt;P&gt;&amp;nbsp;&lt;/P&gt;       if k == ord('q'):&lt;P&gt;&amp;nbsp;&lt;/P&gt;            print('Q Pressed...\nEnding execution')&lt;P&gt;&amp;nbsp;&lt;/P&gt;            break&lt;P&gt;&amp;nbsp;&lt;/P&gt;       if k == ord('f'):&lt;P&gt;&amp;nbsp;&lt;/P&gt;            if flag_save_frames:&lt;P&gt;&amp;nbsp;&lt;/P&gt;                 print('F Pressed...\nStopped fetching frames...')&lt;P&gt;&amp;nbsp;&lt;/P&gt;                 flag_save_frames = False&lt;P&gt;&amp;nbsp;&lt;/P&gt;            else:&lt;P&gt;&amp;nbsp;&lt;/P&gt;                 print('F Pressed...\nStarted fetching frames...')&lt;P&gt;&amp;nbsp;&lt;/P&gt;                 flag_save_frames = True&lt;P&gt;XXXWHITESPA...&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 08:50:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354011#M1305</guid>
      <dc:creator>KKedi</dc:creator>
      <dc:date>2017-09-14T08:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Depth map of black pixels in an image is not coming</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354012#M1306</link>
      <description>&lt;P&gt;Causes of an image being black like this can include:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.  The light source in the room is too dark or too bright.  The camera has a component called an IR emitter that assists the IR sensor with exposure, and if the lighting is too low or too high, the emitter can cause the IR sensor to become saturated.  The IR emitter can be turned off with scripting in Librealsense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Enables / disables R200 emitter&lt;/P&gt;&lt;P&gt;     */&lt;/P&gt;&lt;P&gt;    public void setEmitterEnabled(int value) {&lt;/P&gt;&lt;P&gt;        setOption(RealSense.RS_OPTION_R200_EMITTER_ENABLED, value);&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  The 'gain' value may be too low.  Increasing gain can make an image brighter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if you have a problem with depth scans that are too noisy, using a 'point cloud' type of depth scan may yield better results.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 12:05:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354012#M1306</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2017-09-14T12:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Depth map of black pixels in an image is not coming</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354013#M1307</link>
      <description>&lt;P&gt;MartyG the light source is good enough. It is always the case that the depth for the objects black in colour is undefined. Are black objects a limitation for SR300? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The depth images are very noisy and so are there any predefined methods that helps us reduce noise?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 05:29:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354013#M1307</guid>
      <dc:creator>KKedi</dc:creator>
      <dc:date>2017-09-15T05:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Depth map of black pixels in an image is not coming</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354014#M1308</link>
      <description>&lt;P&gt;Further research revealed that it is apparently a fundamental principle of 3D scanning in general (not just RealSense) that black / dark objects do not scan well because the color absorbs the laser.  A tip that was shared many times for scanning black objects was to cover them in a spray or a powder fine enough to spray on, such as foot powder or baby powder so that the laser can see the surface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently found a link to a professional 3D scanning spray.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://3dscanspray.com/"&gt;https://3dscanspray.com/&lt;/A&gt; &lt;A href="http://3DScanSpray.com"&gt;3DScanSpray.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, I think I would think that coating your t-shirt in baby powder would be a nicer option than foot powder!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned above, doing a 'point cloud' depth scan may provide better results if you have noise on your scan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/intel-realsense-technology-and-the-point-cloud"&gt;https://software.intel.com/en-us/articles/intel-realsense-technology-and-the-point-cloud&lt;/A&gt; Intel® RealSense™ Technology and the Point Cloud | Intel® Software &lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 05:53:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354014#M1308</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2017-09-15T05:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Depth map of black pixels in an image is not coming</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354015#M1309</link>
      <description>&lt;P&gt;As I noted before, shiny and/or transparent objects have a similar problem (in this case, the light is not absorbed, but reflected or refracted in a direction not visible to the camera).   Hair is yet ANOTHER problem: it's just too fine to reflect the dot pattern in a coherent way, and often individual hairs are below the camera resolution.  Of course if the hair is black you have more than one problem.  Edges of objects are also often not picked up well as they are at an extreme angle with respect to the camera (and may be shadowed from one camera or the other), and also pick up relatively small amounts of light from the projector.  As an added complication, objects that are "glossy" tend to act more and more "shiny" (more specular, or mirror-like) at glancing angles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are not RealSense problems per se but&lt;I&gt; general&lt;/I&gt; problems with depth sensing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately using a spray or otherwise modifying the object to be scanned (eg using a hair cap) is not always feasible.   Your best strategy is probably to make your algorithms robust to holes in the data, and using hole-filling algorithms were appropriate.  Don't forget you also have color pixels even where there is no depth so you can peek at them to see if a hole is a "real" hole or maybe due to the pixel being dark (which you can easily determine from the color channel).&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 06:06:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354015#M1309</guid>
      <dc:creator>Michael_M_Intel1</dc:creator>
      <dc:date>2017-09-15T06:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Depth map of black pixels in an image is not coming</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354016#M1310</link>
      <description>&lt;P&gt;Hi MartyG Thanks for your response. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R200 camera uses a similar technology. However, such a problem is not present there. I had my friend using it and he was able to get the depth maps for the black objects as well.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 09:30:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354016#M1310</guid>
      <dc:creator>KKedi</dc:creator>
      <dc:date>2017-09-15T09:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Depth map of black pixels in an image is not coming</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354017#M1311</link>
      <description>&lt;P&gt;I did further research into scanning black objects, and every information source repeated the earlier suggestions of changing the lighting conditions or using a spray / powder.  The only new tip I did see suggested was to turn the camera 90 degrees to change how the laser light falls onto the object being scanned.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 09:55:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354017#M1311</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2017-09-15T09:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Depth map of black pixels in an image is not coming</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354018#M1312</link>
      <description>&lt;P&gt;Do you know if new generation of realsense D415 &amp;amp; D335 deal better with this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 10:08:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354018#M1312</guid>
      <dc:creator>PPola</dc:creator>
      <dc:date>2017-10-10T10:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Depth map of black pixels in an image is not coming</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354019#M1313</link>
      <description>&lt;P&gt;Whilst the new cameras would still be subject to the same general physics problem of dark / black colors absorbing laser light, they do have a new Advanced Mode that enables users to have greater control over depth generation and color correction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/development/doc/rs400/rs400_advanced_mode.md"&gt;https://github.com/IntelRealSense/librealsense/blob/development/doc/rs400/rs400_advanced_mode.md&lt;/A&gt; librealsense/rs400_advanced_mode.md at development · IntelRealSense/librealsense · GitHub&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 10:19:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-map-of-black-pixels-in-an-image-is-not-coming/m-p/354019#M1313</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2017-10-10T10:19:20Z</dc:date>
    </item>
  </channel>
</rss>

