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
5225672d
Commit
5225672d
authored
Nov 26, 2012
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added edge-aware demosaicing and bayer to bgra conversion
parent
4d059e9e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
2 deletions
+52
-2
imgproc.hpp
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
+15
-1
types_c.h
modules/imgproc/include/opencv2/imgproc/types_c.h
+12
-1
perf_cvt_color.cpp
modules/imgproc/perf/perf_cvt_color.cpp
+25
-0
color.cpp
modules/imgproc/src/color.cpp
+0
-0
demosaicing.cpp
modules/imgproc/src/demosaicing.cpp
+0
-0
test_color.cpp
modules/imgproc/test/test_color.cpp
+0
-0
No files found.
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
View file @
5225672d
...
...
@@ -1048,7 +1048,18 @@ enum
COLOR_RGBA2mRGBA
=
125
,
COLOR_mRGBA2RGBA
=
126
,
COLOR_COLORCVT_MAX
=
127
// Edge-Aware Demosaicing
COLOR_BayerBG2BGR_EA
=
127
,
COLOR_BayerGB2BGR_EA
=
128
,
COLOR_BayerRG2BGR_EA
=
129
,
COLOR_BayerGR2BGR_EA
=
130
,
COLOR_BayerBG2RGB_EA
=
COLOR_BayerRG2BGR_EA
,
COLOR_BayerGB2RGB_EA
=
COLOR_BayerGR2BGR_EA
,
COLOR_BayerRG2RGB_EA
=
COLOR_BayerBG2BGR_EA
,
COLOR_BayerGR2RGB_EA
=
COLOR_BayerGB2BGR_EA
,
COLOR_COLORCVT_MAX
=
131
};
...
...
@@ -1252,6 +1263,9 @@ protected:
Point2f
bottomRight
;
};
// main function for all demosaicing procceses
CV_EXPORTS_W
void
demosaicing
(
InputArray
_src
,
OutputArray
_dst
,
int
code
,
int
dcn
=
0
);
}
#endif
/* __cplusplus */
...
...
modules/imgproc/include/opencv2/imgproc/types_c.h
View file @
5225672d
...
...
@@ -310,7 +310,18 @@ enum
CV_RGBA2mRGBA
=
125
,
CV_mRGBA2RGBA
=
126
,
CV_COLORCVT_MAX
=
127
// Edge-Aware Demosaicing
CV_BayerBG2BGR_EA
=
127
,
CV_BayerGB2BGR_EA
=
128
,
CV_BayerRG2BGR_EA
=
129
,
CV_BayerGR2BGR_EA
=
130
,
CV_BayerBG2RGB_EA
=
CV_BayerRG2BGR_EA
,
CV_BayerGB2RGB_EA
=
CV_BayerGR2BGR_EA
,
CV_BayerRG2RGB_EA
=
CV_BayerBG2BGR_EA
,
CV_BayerGR2RGB_EA
=
CV_BayerGB2BGR_EA
,
CV_COLORCVT_MAX
=
131
};
...
...
modules/imgproc/perf/perf_cvt_color.cpp
View file @
5225672d
...
...
@@ -274,3 +274,28 @@ PERF_TEST_P(Size_CvtMode2, cvtColorYUV420,
SANITY_CHECK
(
dst
,
1
);
}
CV_ENUM
(
EdgeAwareBayerMode
,
COLOR_BayerBG2BGR_EA
,
COLOR_BayerGB2BGR_EA
,
COLOR_BayerRG2BGR_EA
,
COLOR_BayerGR2BGR_EA
)
typedef
std
::
tr1
::
tuple
<
Size
,
EdgeAwareBayerMode
>
EdgeAwareParams
;
typedef
perf
::
TestBaseWithParam
<
EdgeAwareParams
>
EdgeAwareDemosaicingTest
;
PERF_TEST_P
(
EdgeAwareDemosaicingTest
,
demosaicingEA
,
testing
::
Combine
(
testing
::
Values
(
szVGA
,
sz720p
,
sz1080p
,
Size
(
130
,
60
)),
testing
::
ValuesIn
(
EdgeAwareBayerMode
::
all
())
)
)
{
Size
sz
=
get
<
0
>
(
GetParam
());
int
mode
=
get
<
1
>
(
GetParam
());
Mat
src
(
sz
,
CV_8UC1
);
Mat
dst
(
sz
,
CV_8UC3
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
TEST_CYCLE
()
cvtColor
(
src
,
dst
,
mode
,
3
);
SANITY_CHECK
(
dst
,
1
);
}
modules/imgproc/src/color.cpp
View file @
5225672d
This diff is collapsed.
Click to expand it.
modules/imgproc/src/demosaicing.cpp
0 → 100644
View file @
5225672d
This diff is collapsed.
Click to expand it.
modules/imgproc/test/test_color.cpp
View file @
5225672d
This diff is collapsed.
Click to expand it.
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