SDK 2.0 Firmware Code samples Documentation Github Community Intel® RealSense™ SDK 2.0 It's easy to build a depth application of the future with the cross-platform open source Intel® RealSense™ SDK 2.0. Download for Windows 10 Stable: v2.40.0 | Source code | Pre‑release: v2.37.0 Different OS? Download for Windows 7, Linux or see below. Windows Download SDK for Windows 10 Download SDK for Windows 7 Download Intel RealSense Viewer Installation guide Linux Installing the packages: Add Intel server to the list of repositories : echo 'deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main' | sudo tee /etc/apt/sources.list.d/realsense-public.list It is recommended to backup /etc/apt/sources.list.d/realsense-public.list file in case of an upgrade. Register the server’s public key : sudo apt-key adv --keyserver keys.gnupg.net --recv-key 6F3EFCDE Refresh the list of repositories and packages available : sudo apt-get update In order to run demos install: sudo apt-get install librealsense2-dkms sudo apt-get install librealsense2-utils The above two lines will deploy librealsense2 udev rules, kernel drivers, runtime library and executable demos and tools. Reconnect the Intel RealSense depth camera and run: realsense-viewer Developers shall install additional packages: sudo apt-get install librealsense2-dev sudo apt-get install librealsense2-dbg With dev package installed, you can compile an application with librealsense using g++ -std=c++11 filename.cpp -lrealsense2 or an IDE of your choice. Verify that the kernel is updated : modinfo uvcvideo | grep "version:" should include realsense string Package Details: The packages and their respective content are listed below: Name Content Depends on librealsense2-udev-rules Manages the devices permissions configuration for – realsense-uvcvideo DKMS package for Depth cameras-specific kernel extensions librealsense2-udev-rules librealsense2 RealSense™ SDK runtime (.so) and configuration files librealsense2-udev-rules librealsense2-utils Demos and tools available as a part of RealSense™ SDK librealsense2 librealsense2-dev Header files and symbolic link for developers librealsense2 librealsense2-dbg Debug symbols for developers librealsense2 Learn more We provide our installation packages in dpkg format for Ubuntu 16.04/18.04 LTS Android Download from Google Play Learn more Scan QR code The Intel RealSense SDK 2.0 is cross-platform and operating system independent. In addition to the platforms above we also have installation guides for Jetson TX2, Raspberry Pi 3 and macOS. Supported platforms and languages Choose an integration to get started. Supported platforms and languages Choose an integration to get started. Code samples Get your project off the ground quickly with help from our code examples and tutorials. View samples rs-hello-realsense rs-capture rs-face-dlib rs-hello-realsense 'rs-hello-realsense' example demonstrates the basics of connecting to an Intel RealSense device and taking advantage of depth data by printing the distance to object in the center of camera field of view. Code Preview #include <librealsense2/rs.hpp> // Include RealSense Cross Platform API // Create a Pipeline - this serves as a top-level API for streaming and processing frames rs2::pipeline p; // Configure and start the pipeline p.start(); // Block program until frames arrive rs2::frameset frames = p.wait_for_frames(); // Try to get a frame of a depth image rs2::depth_frame depth = frames.get_depth_frame(); // Get the depth frame's dimensions float width = depth.get_width(); float height = depth.get_height(); // Query the distance from the camera to the object in the center of the image float dist_to_center = depth.get_distance(width / 2, height / 2); // Print the distance std::cout << "The camera is facing an object " << dist_to_center << " meters away \r"; Download source rs-capture This sample demonstrates how to configure the camera for streaming and rendering Depth & RGB data to the screen. We use OpenGL for cross-platform rendering and GLFW for window management. For OpenCV users we have an imshow alternative. Code Preview #include <librealsense2/rs.hpp> // Include RealSense Cross Platform API #include "example.hpp" // Include a short list of convenience functions for rendering // Create a simple OpenGL window for rendering: window app(1280, 720, "RealSense Capture Example"); // Declare depth colorizer for enhanced color visualization of depth data rs2::colorizer color_map; // Declare rates printer for showing streaming rates of the enabled streams. rs2::rates_printer printer; // Declare the RealSense pipeline, encapsulating the actual device and sensors rs2::pipeline pipe; // Start streaming with default recommended configuration // The default video configuration contains Depth and Color streams // If a device is capable to stream IMU data, both Gyro and Accelerometer are enabled by default pipe.start(); rs2::frameset data = pipe.wait_for_frames(). // Wait for next set of frames from the camera apply_filter(printer). // Print each enabled stream frame rate apply_filter(color_map); // Find and colorize the depth data // Show method, when applied on frameset, break it to frames and upload each frame into a gl textures // Each texture is displayed on different viewport according to it's stream unique id app.show(data); Download source rs-face-dlib This example demonstrates a very simple facial landmark detection using Dlib's machine learning algorithms, using depth data to implement basic anti-spoofing. This is just an example intended to showcase possible applications. The heuristics used here are very simple and basic, and can be greatly improved on. Code Preview // Enable usage of librealsense frame data as a dlib image rs_frame_image< dlib::rgb_pixel, RS2_FORMAT_RGB8 > image( color_frame ); // 1. Faces are detected in two steps: // Facial boundary rectangles are detected: dlib::frontal_face_detector face_bbox_detector = dlib::get_frontal_face_detector(); ... std::vector< dlib::rectangle > face_bboxes = face_bbox_detector( image ); // 2. Each one is then annotated to find its landmarks: dlib::shape_predictor face_landmark_annotator; dlib::deserialize( "shape_predictor_68_face_landmarks.dat" ) >> face_landmark_annotator; ... std::vector< dlib::full_object_detection > faces; for( auto const & bbox : face_bboxes ) faces.push_back( face_landmark_annotator( image, bbox )); if( nose_depth >= eye_depth ) return false; if( eye_depth - nose_depth > 0.07f ) return false; if( ear_depth <= eye_depth ) return false; if( mouth_depth <= nose_depth ) return false; if( mouth_depth > chin_depth ) return false; // All the distances, collectively, should not span a range that makes no sense. // F.e. if the face accounts for more than 20cm of depth, or less than 2cm, then something's not valid float x = std::max( { nose_depth, eye_depth, ear_depth, mouth_depth, chin_depth } ); float n = std::min( { nose_depth, eye_depth, ear_depth, mouth_depth, chin_depth } ); if( x - n > 0.20f ) return false; if( x - n < 0.02f ) return false; // Align depth and color frames rs2::align align_to_color( RS2_STREAM_COLOR ); ... rs2::frameset data = pipe.wait_for_frames(); data = align_to_color.process( data ); // Replace with aligned frames Download source Tools SDK tools help you harness your depth camera’s capabilities. Intel® RealSense™ Viewer Quickly access your Intel RealSense depth camera to view the depth stream, visualize point clouds, record and playback streams, configure your camera settings and more. Download User's guide Depth Quality Tool Test the camera depth quality with tools including: plane fit RMS error, subpixel accuracy, fill rate, distance accuracy compared to ground truth, on‑chip self‑calibration and tare calibration. Download Stay updated Country/Region * Afghanistan Aland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bonaire Bosnia and Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Darussalam Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Congo, The Democratic Republic of the Cook Islands Costa Rica Cote D'ivoire Croatia Cuba Curacao Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Falkland Islands (Malvinas) Faroe Islands Fiji Finland France French Guiana French Poly. French S. Terr. Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard Island and Mcdonald Islands Holy See (Vatican City State) Honduras Hong Kong Hungary Iceland India Indonesia Iran, Islamic Republic of Iraq Ireland Isle of Man Israel Italy Jamaica Japan Jersey Jordan Kazakhstan Kenya Kiribati Korea, Democratic People's Republic of Korea, Republic of Kuwait Kyrgyzstan Lao People's Democratic Republic Latvia Lebanon Lesotho Liberia Libya Liechtenstein Lithuania Luxembourg Macau Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia, Federated States of Moldova, Republic of Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands Netherlands Antilles New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Northern Mariana Islands Norway Oman Pakistan Palau Palestine, State Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Reunion Romania Russian Federation Rwanda Saint Helena Saint Kitts and Nevis Saint Lucia Saint Martin Saint Pierre Saint Vincent and The Grenadines Samoa San Marino Sao Tome and Principe Saudi Arabia Senegal Serbia Serbia and Montenegro Seychelles Sierra Leone Singapore Sint Maarten Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia and The South Sandwich Islands South Sudan Spain Sri Lanka St. Barthelemy Sudan Suriname Svalbard Swaziland Sweden Switzerland Syrian Arab Republic Taiwan Tajikistan Tanzania, United Republic of Thailand Timor-Leste Togo Tokelau Tonga Trinidad and Tobago Tunisia Turkey Turkmenistan Turks and Caicos Islands Tuvalu Uganda Ukraine United Arab Emirates United Kingdom United States United States Minor Outlying Islands Uruguay Uzbekistan Vanuatu Venezuela Vietnam Virgin Islands, British Virgin Islands, U.S. Wallis and Futuna Western Sahara Yemen Yugoslavia Zambia Zimbabwe Thank you!You were successfully subscribed. By submitting this form, you are confirming you are an adult 18 years or older and you agree to Intel contacting you with marketing-related emails or by telephone. You may unsubscribe at any time. Intel’s web sites and communications are subject to our Privacy Notice and Terms of Use. Talk to sales Let’s talk about how Intel RealSense depth sensing cameras can enhance your solution. Talk to a representative Please complete the form below so we can offer you the best solution. Country/Region * Afghanistan Aland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bonaire Bosnia and Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Darussalam Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Congo, The Democratic Republic of the Cook Islands Costa Rica Cote D'ivoire Croatia Cuba Curacao Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Falkland Islands (Malvinas) Faroe Islands Fiji Finland France French Guiana French Poly. French S. Terr. Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard Island and Mcdonald Islands Holy See (Vatican City State) Honduras Hong Kong Hungary Iceland India Indonesia Iran, Islamic Republic of Iraq Ireland Isle of Man Israel Italy Jamaica Japan Jersey Jordan Kazakhstan Kenya Kiribati Korea, Democratic People's Republic of Korea, Republic of Kuwait Kyrgyzstan Lao People's Democratic Republic Latvia Lebanon Lesotho Liberia Libya Liechtenstein Lithuania Luxembourg Macau Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia, Federated States of Moldova, Republic of Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands Netherlands Antilles New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Northern Mariana Islands Norway Oman Pakistan Palau Palestine, State Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Reunion Romania Russian Federation Rwanda Saint Barthelemy Saint Helena Saint Kitts and Nevis Saint Lucia Saint Martin Saint Pierre Saint Vincent and The Grenadines Samoa San Marino Sao Tome and Principe Saudi Arabia Senegal Serbia Serbia and Montenegro Seychelles Sierra Leone Singapore Sint Maarten Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia and The South Sandwich Islands South Sudan Spain Sri Lanka Sudan Suriname Svalbard Swaziland Sweden Switzerland Syrian Arab Republic Taiwan Tajikistan Tanzania, United Republic of Thailand Timor-Leste Togo Tokelau Tonga Trinidad and Tobago Tunisia Turkey Turkmenistan Turks and Caicos Islands Tuvalu Uganda Ukraine United Arab Emirates United Kingdom United States United States Minor Outlying Islands Uruguay Uzbekistan Vanuatu Venezuela Vietnam Virgin Islands, British Virgin Islands, U.S. Wallis and Futuna Western Sahara Yemen Zambia Zimbabwe Company Size * <100 Employees 100-1000 Employees 1000-5000 Employees 5000+ Employees State * Alaska Alabama Arizona Arkansas California Colorado Connecticut District Of Columbia Delaware Florida Georgia Hawaii Iowa Idaho Illinois Indiana Kansas Kentucky Louisiana Massachusetts Maryland Maine Michigan Minnesota Missouri Mississippi Montana North Carolina North Dakota Nebraska New Hampshire New Jersey New Mexico Nevada New York Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Virginia Vermont Washington Wisconsin West Virginia Wyoming Which Intel RealSense product are you interested in? * Need advice Intel® RealSense™ ID Solution F450 Intel® RealSense™ ID Solution F455 Intel® RealSense™ Touchless Control Software Intel® RealSense™ LiDAR Camera L515 Intel® RealSense™ D415 depth camera Intel® RealSense™ D435 depth camera Intel® RealSense™ D435i depth camera Intel® RealSense™ SR305 depth camera Intel® RealSense™ T265 tracking camera Intel® RealSense™ T261 tracking module Intel® RealSense™ D430 depth module Intel® RealSense™ D420 depth module Intel® RealSense™ D415 depth module Intel® RealSense™ D410 depth module Intel® RealSense™ D400 depth module Intel® RealSense™ SR300 depth module What application are you planning bring to market? * Smart lock Gate access control ATM POS Drone Scanning Device Consumer robot Commercial robot Vacuum robot Digital signage or wall-mounted display Kiosk or vending machine Client device (personal computer, tablet, smartphone, etc.) VR/AR Other (please describe) Please describe: Estimated Quantity in the next 12 months * Greater than 1,000,000 units 100,000 – 1,000,000 units 10,000 – 100,000 units 1,000 - 10,000 units 100 - 1,000 units Fewer than 100 units Which capabilities are you planning to or currently working with (Select the top three that apply)? Object scan Room scan Collision avoidance Measurement Facial authentication Gesture control Skeleton tracking 3D scan Navigation Other (please describe) Please describe: Yes, I would like to subscribe to stay connected to the latest Intel technologies and industry trends by email and telephone. I can unsubscribe at any time. By submitting this form, you are confirming you are an adult 18 years or older and you agree to share your personal information with Intel to use for this business request. You also agree to subscribe to stay connected to the latest Intel technologies and industry trends by email and telephone. You may unsubscribe at any time. Intel’s web sites and communications are subject to our Privacy Notice and Terms of Use. errors Thank you!We'll be in touch soon. Contact