Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
shy_201992
openpose
提交
a10d4e8c
O
openpose
项目概览
shy_201992
/
openpose
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openpose
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a10d4e8c
编写于
8月 01, 2017
作者:
G
gineshidalgo99
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Valid image extensions are now case insensitive
上级
14c829b5
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
40 addition
and
4 deletion
+40
-4
include/openpose/utilities/string.hpp
include/openpose/utilities/string.hpp
+4
-0
src/openpose/producer/imageDirectoryReader.cpp
src/openpose/producer/imageDirectoryReader.cpp
+2
-2
src/openpose/utilities/fileSystem.cpp
src/openpose/utilities/fileSystem.cpp
+3
-2
src/openpose/utilities/string.cpp
src/openpose/utilities/string.cpp
+31
-0
未找到文件。
include/openpose/utilities/string.hpp
浏览文件 @
a10d4e8c
...
@@ -16,6 +16,10 @@ namespace op
...
@@ -16,6 +16,10 @@ namespace op
OP_API
std
::
string
toFixedLengthString
(
const
T
number
,
const
unsigned
long
long
stringLength
=
0
);
OP_API
std
::
string
toFixedLengthString
(
const
T
number
,
const
unsigned
long
long
stringLength
=
0
);
OP_API
std
::
vector
<
std
::
string
>
splitString
(
const
std
::
string
&
stringToSplit
,
const
std
::
string
&
delimiter
);
OP_API
std
::
vector
<
std
::
string
>
splitString
(
const
std
::
string
&
stringToSplit
,
const
std
::
string
&
delimiter
);
OP_API
std
::
string
toLower
(
const
std
::
string
&
string
);
OP_API
std
::
string
toUpper
(
const
std
::
string
&
string
);
}
}
#endif // OPENPOSE_UTILITIES_STRING_HPP
#endif // OPENPOSE_UTILITIES_STRING_HPP
src/openpose/producer/imageDirectoryReader.cpp
浏览文件 @
a10d4e8c
...
@@ -10,8 +10,8 @@ namespace op
...
@@ -10,8 +10,8 @@ namespace op
try
try
{
{
// Get files on directory with the desired extensions
// Get files on directory with the desired extensions
const
std
::
vector
<
std
::
string
>
extensions
{
"
.bmp"
,
".dib"
,
".pbm"
,
".pgm"
,
".ppm"
,
".sr"
,
".ras"
,
// Completely supported by OpenCV
const
std
::
vector
<
std
::
string
>
extensions
{
"
bmp"
,
"dib"
,
"pbm"
,
"pgm"
,
"ppm"
,
"sr"
,
"ras"
,
// Completely supported by OpenCV
"
.jpg"
,
"jpeg"
,
".png"
};
// Most of them supported by OpenCV
"
jpg"
,
"jpeg"
,
"png"
};
// Most of them supported by OpenCV
const
auto
imagePaths
=
getFilesOnDirectory
(
imageDirectoryPath
,
extensions
);
const
auto
imagePaths
=
getFilesOnDirectory
(
imageDirectoryPath
,
extensions
);
// Check #files > 0
// Check #files > 0
...
...
src/openpose/utilities/fileSystem.cpp
浏览文件 @
a10d4e8c
#include <boost/filesystem.hpp>
#include <boost/filesystem.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <openpose/utilities/fileSystem.hpp>
#include <openpose/utilities/fileSystem.hpp>
#include <openpose/utilities/string.hpp>
namespace
op
namespace
op
{
{
...
@@ -134,9 +135,9 @@ namespace op
...
@@ -134,9 +135,9 @@ namespace op
{
{
try
try
{
{
const
auto
cleanedExtension
=
removeExtensionDot
(
extension
);
const
auto
cleanedExtension
=
toLower
(
removeExtensionDot
(
extension
)
);
for
(
auto
&
extensionI
:
extensions
)
for
(
auto
&
extensionI
:
extensions
)
if
(
cleanedExtension
==
removeExtensionDot
(
extensionI
))
if
(
cleanedExtension
==
toLower
(
removeExtensionDot
(
extensionI
)
))
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
...
src/openpose/utilities/string.cpp
浏览文件 @
a10d4e8c
#include <algorithm> // std::transform
#include <openpose/utilities/string.hpp>
#include <openpose/utilities/string.hpp>
namespace
op
namespace
op
...
@@ -55,6 +56,36 @@ namespace op
...
@@ -55,6 +56,36 @@ namespace op
}
}
}
}
std
::
string
toLower
(
const
std
::
string
&
string
)
{
try
{
auto
result
=
string
;
std
::
transform
(
string
.
begin
(),
string
.
end
(),
result
.
begin
(),
tolower
);
return
result
;
}
catch
(
const
std
::
exception
&
e
)
{
error
(
e
.
what
(),
__LINE__
,
__FUNCTION__
,
__FILE__
);
return
""
;
}
}
std
::
string
toUpper
(
const
std
::
string
&
string
)
{
try
{
auto
result
=
string
;
std
::
transform
(
string
.
begin
(),
string
.
end
(),
result
.
begin
(),
toupper
);
return
result
;
}
catch
(
const
std
::
exception
&
e
)
{
error
(
e
.
what
(),
__LINE__
,
__FUNCTION__
,
__FILE__
);
return
""
;
}
}
// Signed
// Signed
template
std
::
string
toFixedLengthString
<
char
>(
const
char
number
,
const
unsigned
long
long
stringLength
);
template
std
::
string
toFixedLengthString
<
char
>(
const
char
number
,
const
unsigned
long
long
stringLength
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录