Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
31dff1e0
Commit
31dff1e0
authored
Oct 31, 2018
by
Pavel Rojtberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ovis: add more CV_MAT <> Ogre::PixelFormat conversions
parent
6bd26d33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
ovis.cpp
modules/ovis/src/ovis.cpp
+15
-1
No files found.
modules/ovis/src/ovis.cpp
View file @
31dff1e0
...
...
@@ -43,8 +43,14 @@ void _createTexture(const String& name, Mat image)
case
CV_8UC1
:
format
=
PF_BYTE_L
;
break
;
case
CV_16UC1
:
format
=
PF_L16
;
break
;
case
CV_32FC1
:
format
=
PF_FLOAT32_R
;
break
;
default
:
CV_Error
(
Error
::
StsBadArg
,
"currently
only CV_8UC1, CV_8UC3, CV_8UC4 textures are supported
"
);
CV_Error
(
Error
::
StsBadArg
,
"currently
supported formats are only CV_8UC1, CV_8UC3, CV_8UC4, CV_16UC1, CV_32FC1
"
);
break
;
}
...
...
@@ -388,18 +394,26 @@ public:
int
dst_type
;
switch
(
src_type
)
{
case
PF_R8
:
case
PF_L8
:
dst_type
=
CV_8U
;
break
;
case
PF_BYTE_RGB
:
dst_type
=
CV_8UC3
;
break
;
case
PF_BYTE_RGBA
:
dst_type
=
CV_8UC4
;
break
;
case
PF_FLOAT32_R
:
dst_type
=
CV_32F
;
break
;
case
PF_FLOAT32_RGB
:
dst_type
=
CV_32FC3
;
break
;
case
PF_FLOAT32_RGBA
:
dst_type
=
CV_32FC4
;
break
;
case
PF_L16
:
case
PF_DEPTH16
:
dst_type
=
CV_16U
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment