platform/core/multimedia/dfs-opencv.git
23 months agoChange output type from 32float to unsigned 16bit integer
Tae-Young Chung [Thu, 16 Jun 2022 05:19:11 +0000 (14:19 +0900)]
Change output type from 32float to unsigned 16bit integer

The output is now real depth range, distance, not disparity.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoSet pointCloudData and pointCloudSize to nullptr and zero
Tae-Young Chung [Fri, 6 May 2022 07:43:01 +0000 (16:43 +0900)]
Set pointCloudData and pointCloudSize to nullptr and zero

[Version] 1.0.4-0
[Issue type] bug fix

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoChange mP1 and mP2 values
Tae-Young Chung [Mon, 2 May 2022 02:33:09 +0000 (11:33 +0900)]
Change mP1 and mP2 values

[Version] 1.0.3-0
[Issue type] update

dfs now handles gray level color space. In case of that, the values of
mP1 and P2 should be adjusted.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoInclude and install camera calibration data
Tae-Young Chung [Tue, 26 Apr 2022 07:35:55 +0000 (16:35 +0900)]
Include and install camera calibration data

[Version] 1.0.2-2
[Issue type] update

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoChange constant 16 and 1.0/16.0 values to constexpr
Tae-Young Chung [Thu, 27 Jan 2022 05:54:28 +0000 (14:54 +0900)]
Change constant 16 and 1.0/16.0 values to constexpr

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd stereoConfigPath to get stereoConfig information for point cloud generation
Tae-Young Chung [Mon, 24 Jan 2022 05:30:03 +0000 (14:30 +0900)]
Add stereoConfigPath to get stereoConfig information for point cloud generation

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoChange depth data type to float
Tae-Young Chung [Fri, 14 Jan 2022 06:47:48 +0000 (15:47 +0900)]
Change depth data type to float

[Version] 1.0.1
[Issue type] update

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoCreate cv::StereoSGBM instance with initial values and change parameters values for...
Tae-Young Chung [Fri, 3 Dec 2021 05:04:45 +0000 (14:04 +0900)]
Create cv::StereoSGBM instance with initial values and change parameters values for post-processing

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoFix resize bug
Tae-Young Chung [Thu, 18 Nov 2021 01:07:49 +0000 (10:07 +0900)]
Fix resize bug

When resized images are back to their original sizes,
cv::Size() should be used, not an integer scale value
to handle the case of odd number size.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoRelease 1.0.0
Tae-Young Chung [Wed, 10 Nov 2021 05:55:25 +0000 (14:55 +0900)]
Release 1.0.0

[Version]: 1.0.0
[Issue type]: new feature

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoDisable calibration and exclude camera parameters files from packaging
Tae-Young Chung [Wed, 10 Nov 2021 05:54:08 +0000 (14:54 +0900)]
Disable calibration and exclude camera parameters files from packaging

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoFix erratum
Tae-Young Chung [Wed, 10 Nov 2021 05:38:57 +0000 (14:38 +0900)]
Fix erratum

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoApply changed DFS_DATA_TYPE_* enumeration and a case which a given source is single...
Tae-Young Chung [Tue, 2 Nov 2021 09:01:08 +0000 (18:01 +0900)]
Apply changed DFS_DATA_TYPE_* enumeration and a case which a given source is single typed of side-by-side format

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd threads for computeL and computeR
Tae-Young Chung [Tue, 2 Nov 2021 05:04:10 +0000 (14:04 +0900)]
Add threads for computeL and computeR

In case of post-processing, LR check is required
which a left and a right disparities are mandatory.
To reduce excution time, add two threads which compute
the both disparities at the same time.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd parameters of minimum and maximum disparities to Initialize()
Tae-Young Chung [Tue, 26 Oct 2021 07:57:51 +0000 (16:57 +0900)]
Add parameters of minimum and maximum disparities to Initialize()

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd downscaling to reduce execution time
Tae-Young Chung [Mon, 25 Oct 2021 06:58:24 +0000 (15:58 +0900)]
Add downscaling to reduce execution time

Before running compute() for disparity estimation,
resize the input images' size to half in both width and height.
After compute(), resize the size to the original size.
The, apply WLS filter as post-process.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoFix to use mMinDisparity in StereoSGBM::create()
Tae-Young Chung [Fri, 22 Oct 2021 07:00:00 +0000 (16:00 +0900)]
Fix to use mMinDisparity in StereoSGBM::create()

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd WLS filter
Tae-Young Chung [Thu, 21 Oct 2021 08:19:35 +0000 (17:19 +0900)]
Add WLS filter

WLS filter provides two approaches. One is to use a left color.
Another is to use a left and a right images after getting disparity
at the right.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoUpdate calibration files according to resolutions and enable remap
Tae-Young Chung [Thu, 21 Oct 2021 04:25:06 +0000 (13:25 +0900)]
Update calibration files according to resolutions and enable remap

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoFix build error
Tae-Young Chung [Thu, 21 Oct 2021 03:53:29 +0000 (12:53 +0900)]
Fix build error

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoFix base and extra types to CV_8UC3 and disable remap
Tae-Young Chung [Thu, 21 Oct 2021 01:52:59 +0000 (10:52 +0900)]
Fix base and extra types to CV_8UC3 and disable remap

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoConvert disparity to CV_8UC1 and scale down to 1/16
Tae-Young Chung [Wed, 20 Oct 2021 04:22:44 +0000 (13:22 +0900)]
Convert disparity to CV_8UC1 and scale down to 1/16

SGBM outs disparity map as CV_16SC type after scaling up 16 times.
To dump and check disparity results, convert them CV_8UC1 and
scale down to 1/16.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd width and height parameters to Initialized()'s input parameters
Tae-Young Chung [Tue, 19 Oct 2021 04:21:09 +0000 (13:21 +0900)]
Add width and height parameters to Initialized()'s input parameters

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd InitRectifyMap() and change distortionCoeff order
Tae-Young Chung [Tue, 19 Oct 2021 01:04:08 +0000 (10:04 +0900)]
Add InitRectifyMap() and change distortionCoeff order

mapping table, which is used to rectify distorted images,
is pre-computed in InitRectifyMap().
Before actual depth computation by compute() function of opencv,
rectification with mapping table is done by remap() function
of opencv.

The order of distortion coefficients is k1, k2, p1, p2, and k3,
not k1, k2, k3, p1, and p2.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd stereoCalibZed.yaml for stereo calibration and add InitializeStereoCalibration...
Tae-Young Chung [Mon, 18 Oct 2021 06:51:18 +0000 (15:51 +0900)]
Add stereoCalibZed.yaml for stereo calibration and add InitializeStereoCalibration() method and variables for calibration

The stereoCalibZed.yaml file is for zed camera only. It is added to test dfs-opencv using zed camera.
You should change the file if you try to use other camera.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoFix bug
Tae-Young Chung [Thu, 14 Oct 2021 04:03:14 +0000 (13:03 +0900)]
Fix bug

base.type should be extra.type

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoimplement Run() and GetDepthData()
Tae-Young Chung [Wed, 13 Oct 2021 00:26:41 +0000 (09:26 +0900)]
implement Run() and GetDepthData()

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoChange parameters of Intialize() to DepthParameter
Tae-Young Chung [Fri, 8 Oct 2021 02:41:44 +0000 (11:41 +0900)]
Change parameters of Intialize() to DepthParameter

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoFix errata and add LOG to check enter/leave api
Tae-Young Chung [Thu, 7 Oct 2021 09:18:14 +0000 (18:18 +0900)]
Fix errata and add LOG to check enter/leave api

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd Initialize()
Tae-Young Chung [Thu, 7 Oct 2021 05:27:48 +0000 (14:27 +0900)]
Add Initialize()

Initialize() creates cv::StereoSGBM as a smart pointer and
initializes some parameters for DFS.
It only supports MODE_SGBM_3WAY.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd dfs-opencv
Tae-Young Chung [Tue, 5 Oct 2021 06:32:16 +0000 (15:32 +0900)]
Add dfs-opencv

This commit is to provide dummy library to test with
dfs-adaptation and mediavision's depth module.

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoInitial commit
Tae-Young Chung [Wed, 29 Sep 2021 02:04:35 +0000 (11:04 +0900)]
Initial commit

Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>