필터 지우기
필터 지우기

Need some help in certain .txt mean

조회 수: 2 (최근 30일)
pizzaa
pizzaa 2023년 6월 6일
답변: Karan Singh 2023년 8월 24일
So i was trying photometric stereo. And i m kinda confused with their "manual data folder" espesially obj_bbox.txt and probes_bbox.txt
Anyone can help me how to obtain these value?? ty so much
If u unzip PSBox-master, than open data u will find manual data folder that contain obj_bbox.txt and probes_bbox.txt. i m just confused how to obtain it with different object picture

답변 (1개)

Karan Singh
Karan Singh 2023년 8월 24일
Hi Pizzaa, I hope you know that the "manual" folder in the PSBox-master repository is provided as an example or template folder that contains some manually annotated data files for photometric stereo. It serves as a reference for understanding the format and content of the required files.
The "manual data" folder in the PSBox-master repository contains example files (“obj_bbox.txt and “probes_bbox.txt) that provide bounding box coordinates for the object and probes in the sample images provided with the dataset. Create a text file named “obj_bbox.txt and save the bounding box coordinates for the object in the format: xmin ymin xmax ymax. Similarly, create a “probes_bbox.txt”.
If you want to automate the annotation process. Find the code below.
% Load object image
objectImage = imread('object_image.jpg');
% Display the object image and allow the user to draw a bounding box
figure;
imshow(objectImage);
title('Select bounding box for object');
objectBox = getrect; % Get the bounding box coordinates
% Save the object bounding box coordinates
objBBox = [objectBox(1), objectBox(2), objectBox(1) + objectBox(3), objectBox(2) + objectBox(4)];
dlmwrite('obj_bbox.txt', objBBox, ' ');
% Load probe image
probeImage = imread('probe_image.jpg');
% Display the probe image and allow the user to draw a bounding box
figure;
imshow(probeImage);
title('Select bounding box for probe');
probeBox = getrect; % Get the bounding box coordinates
% Save the probe bounding box coordinates
probeBBox = [probeBox(1), probeBox(2), probeBox(1) + probeBox(3), probeBox(2) + probeBox(4)];
dlmwrite('probes_bbox.txt', probeBBox, ' ');
Make sure you have the Image Processing Toolbox installed in your MATLAB environment to run this code.

카테고리

Help CenterFile Exchange에서 Camera Calibration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by