Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
a7b3d258
Commit
a7b3d258
authored
Sep 17, 2018
by
Dmitry Kurtaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace CV_USRTYPE1 for int64 to CV_32SC2 in Torch importer
parent
347e09cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
torch_importer.cpp
modules/dnn/src/torch/torch_importer.cpp
+4
-4
No files found.
modules/dnn/src/torch/torch_importer.cpp
View file @
a7b3d258
...
...
@@ -214,8 +214,8 @@ struct TorchImporter
return
CV_16S
;
else
if
(
typeStr
==
"Int"
)
return
CV_32S
;
else
if
(
typeStr
==
"Long"
)
//Carefully! CV_64S type coded as CV_
USRTYPE1
return
CV_
USRTYPE1
;
else
if
(
typeStr
==
"Long"
)
//Carefully! CV_64S type coded as CV_
32SC2
return
CV_
32SC2
;
else
CV_Error
(
Error
::
StsNotImplemented
,
"Unknown type
\"
"
+
typeStr
+
"
\"
of torch class
\"
"
+
str
+
"
\"
"
);
}
...
...
@@ -236,7 +236,7 @@ struct TorchImporter
void
readTorchStorage
(
int
index
,
int
type
=
-
1
)
{
long
size
=
readLong
();
Mat
storageMat
(
1
,
size
,
(
type
!=
CV_
USRTYPE1
)
?
type
:
CV_64F
);
//handle LongStorage as CV_64F Mat
Mat
storageMat
(
1
,
size
,
(
type
!=
CV_
32SC2
)
?
type
:
CV_64F
);
//handle LongStorage as CV_64F Mat
switch
(
type
)
{
...
...
@@ -257,7 +257,7 @@ struct TorchImporter
case
CV_32S
:
THFile_readIntRaw
(
file
,
(
int
*
)
storageMat
.
data
,
size
);
break
;
case
CV_
USRTYPE1
:
case
CV_
32SC2
:
{
double
*
buf
=
storageMat
.
ptr
<
double
>
();
THFile_readLongRaw
(
file
,
(
int64
*
)
buf
,
size
);
...
...
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