Skip to content

Instantly share code, notes, and snippets.

Tsukasa Sugiura UnaNancyOwen

Block or report user

Report or block UnaNancyOwen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@UnaNancyOwen
UnaNancyOwen / main.cpp
Last active Mar 15, 2018
How to workaround for high CPU usage when enable BUILD_WITH_OPENMP
View main.cpp
// Set Color Stream format to YUYV insted of BGR8
rs2::config config;
config.enable_stream( rs2_stream::RS2_STREAM_COLOR, width, height, rs2_format::RS2_FORMAT_YUYV, fps );
// Start Pipline
const rs2::pipeline_profile pipeline_profile = pipeline.start( config );
// Retrieve Frameset
const rs2::frameset frameset = pipeline.wait_for_frames();
@UnaNancyOwen
UnaNancyOwen / librealsense2.10.1.md
Last active Mar 23, 2018
Building RealSense SDK 2 (librealsense2) with Visual Studio
View librealsense2.10.1.md
@UnaNancyOwen
UnaNancyOwen / CMakeLists.txt
Last active Apr 20, 2019
Drawing Point Cloud retrieve from Intel RealSense Depth Camera (D415/D435)
View CMakeLists.txt
cmake_minimum_required( VERSION 3.6 )
# Require C++14 (or later)
set( CMAKE_CXX_STANDARD 14 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CMAKE_CXX_EXTENSIONS OFF )
project( sample )
add_executable( sample main.cpp )
set_property( DIRECTORY PROPERTY VS_STARTUP_PROJECT "sample" )
View color.cpp
// Retrrieve Flame
rs2::video_frame color_frame = frameset.get_color_frame();
// Retrieve Flame Size
const uint32_t color_width = color_frame.as<rs2::video_frame>().get_width();
const uint32_t color_height = color_frame.as<rs2::video_frame>().get_height();
// Retrive Data
const uint8_t* color_data = reinterpret_cast<const uint8_t*>( color_frame.get_data() );
@UnaNancyOwen
UnaNancyOwen / main.cpp
Last active Feb 6, 2018
librealsense2 manual transform to depth from disparity and vice versa
View main.cpp
// Retrieve Focal Length
rs2::video_stream_profile profile = pipeline_profile.get_stream( rs2_stream::RS2_STREAM_DEPTH ).as<rs2::video_stream_profile>();
const float focal_length = profile.get_intrinsics().fx;
// Retriece Base Line
const float baseline = disparity_frame.as<rs2::disparity_frame>().get_baseline();
// Target Pixel (e.g. Center of Image)
const uint32_t x = disparity_width / 2;
const uint32_t y = disparity_height / 2;
View calendar2017.md
@UnaNancyOwen
UnaNancyOwen / vcpkg_qtcreator.md
Last active Apr 15, 2019
How to use Qt that installed by Vcpkg with Qt Creator
View vcpkg_qtcreator.md

How to use Qt that installed by Vcpkg with Qt Creator

(0) Install Qt using Vcpkg

Vcpkgを使用してQtをインストールする。(e.g. C:\vcpkg)

cd C:\vcpkg
.\vcpkg install qt5:x64-windows
View sample.cpp
// Retrieve Body Frame
ComPtr<IBodyFrame> bodyFrame;
const HRESULT ret = bodyFrameReader->AcquireLatestFrame( &bodyFrame );
if( FAILED( ret ) ){
return;
}
// Retrieve Body Data
std::vector<ComPtr<IBody>> bodies( BODY_COUNT );
ERROR_CHECK( bodyFrame->GetAndRefreshBodyData( static_cast<UINT>( bodies.size() ), &bodies[0] ) );
@UnaNancyOwen
UnaNancyOwen / kinect2_serialization.h
Last active May 19, 2017
Serialize Definitions of Boost.Serialization (XML) for Kinect SDK v2 Body Data
View kinect2_serialization.h
// kinect2_serialization
//
// kinect2_serialization is definitions of Boost.Serialization (XML) for body data that retrieved using Kinect SDK v2.
// You will be able to serialize and deserialize body data using this definitions.
// kinect2_serialization are requires Boost.Serialization and Kinect SDK v2 when serializing data.
// kinect2_serialization are requires only Boost.Serialization when deserialize data.
//
// This source code is licensed under the MIT license. Please see the License in License.txt.
// Copyright (c) 2017 Tsukasa SUGIURA
// t.sugiura0204@gmail.com
@UnaNancyOwen
UnaNancyOwen / libpng1.6.29.md
Last active Feb 3, 2019
Building libpng with Visual Studio
View libpng1.6.29.md

Building libpng 1.6.29 with Visual Studio

Download

  1. zlib 1.2.11(zlib1211.zip)をダウンロードしてファイを解凍する。(C:\zlib-1.2.11)
    https://zlib.net/

  2. libpng 1.6.29(libpng1629.zip)をダウンロードしてファイルを解凍する。(C:\lpng1629) http://www.libpng.org/pub/png/libpng.html

You can’t perform that action at this time.