Bag_data_extraction

버전 1.0 (22.4 KB) 작성자: Chhayank Srivastava
A tool which helps to extract various data streams from pre-recorded *.bag files. Recorded with intel realsense L515 camera.
다운로드 수: 67
업데이트 날짜: 2023/7/30

Bag_data_extraction

A Matlab routine to extract data from *.bag file created by Intel realsense camera.

View Bag_data_extraction on File Exchange

Usage

extract_info.m

This function is to extract all the information out of the bag file. The output to the function are (all data with name and values),(Names of signals with more than one output),(Name of signals with 0 messages)

[Data,Signal_Info] = extract_info(filename)

rosbag_yuyv_align.m

This function opens a pre-recorded *.bag file aligns it to the color stream and displays the color stream, depth stream, and the overlap. The output is saved as a *.mp4 to be viewed later.

rosbag_yuyv_align(filename)

image

yuyv2rgb_optimized_mex.mexw64

This function is used to convert 32bit YUYV data from Intel realsense camera to RGB image

image = yuyv2rgb_optimized_mex(color_frame.get_data(),color_frame.get_height(),color_frame.get_width())

Sample Code

The below code is a sample code to run the above functions . The variable filename is the bag file name.

%Bag File
filename = 'bag_file.bag';

% Make Config object to manage pipeline settings
cfg = realsense.config();
validateattributes(filename, {'char','string'}, {'scalartext', 'nonempty'}, '', 'filename', 1);

% Tell pipeline to stream from the given rosbag file
cfg.enable_device_from_file(filename)

% Make Pipeline object to manage streaming  
pipe = realsense.pipeline();

% Start streaming from the rosbag with default settings
profile = pipe.start(cfg);

% Get frames
fs = pipe.wait_for_frames();

%Get Color frame
color_frame = fs.get_color_frame();
color_data = color_frame.get_data();

인용 양식

Chhayank Srivastava (2024). Bag_data_extraction (https://github.com/chhayank-sri/Bag_data_extraction/releases/tag/v1.0), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2021a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.