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
dcf96b2d
Commit
dcf96b2d
authored
Jul 02, 2014
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2922 from ilya-lavrenov:mac_fix
parents
1b18ebf2
b1ac35e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
26 deletions
+33
-26
test_fisheye.cpp
modules/calib3d/test/test_fisheye.cpp
+2
-15
cap_qtkit.mm
modules/highgui/src/cap_qtkit.mm
+10
-11
cl_runtime.hpp
modules/ocl/include/opencv2/ocl/cl_runtime/cl_runtime.hpp
+11
-0
test_superres.cpp
modules/superres/test/test_superres.cpp
+10
-0
No files found.
modules/calib3d/test/test_fisheye.cpp
View file @
dcf96b2d
...
...
@@ -60,8 +60,6 @@ protected:
protected
:
std
::
string
combine
(
const
std
::
string
&
_item1
,
const
std
::
string
&
_item2
);
std
::
string
combine_format
(
const
std
::
string
&
item1
,
const
std
::
string
&
item2
,
...);
cv
::
Mat
mergeRectification
(
const
cv
::
Mat
&
l
,
const
cv
::
Mat
&
r
);
};
...
...
@@ -427,10 +425,10 @@ TEST_F(fisheyeTest, rectify)
cv
::
Mat
rectification
=
mergeRectification
(
lundist
,
rundist
);
cv
::
Mat
correct
=
cv
::
imread
(
combine
_format
(
datasets_repository_path
,
"rectification_AB_%03d.png"
,
i
));
cv
::
Mat
correct
=
cv
::
imread
(
combine
(
datasets_repository_path
,
cv
::
format
(
"rectification_AB_%03d.png"
,
i
)
));
if
(
correct
.
empty
())
cv
::
imwrite
(
combine
_format
(
datasets_repository_path
,
"rectification_AB_%03d.png"
,
i
),
rectification
);
cv
::
imwrite
(
combine
(
datasets_repository_path
,
cv
::
format
(
"rectification_AB_%03d.png"
,
i
)
),
rectification
);
else
EXPECT_MAT_NEAR
(
correct
,
rectification
,
1e-10
);
}
...
...
@@ -599,17 +597,6 @@ std::string fisheyeTest::combine(const std::string& _item1, const std::string& _
return
item1
+
(
last
!=
'/'
?
"/"
:
""
)
+
item2
;
}
std
::
string
fisheyeTest
::
combine_format
(
const
std
::
string
&
item1
,
const
std
::
string
&
item2
,
...)
{
std
::
string
fmt
=
combine
(
item1
,
item2
);
char
buffer
[
1
<<
16
];
va_list
args
;
va_start
(
args
,
item2
);
vsprintf
(
buffer
,
fmt
.
c_str
(),
args
);
va_end
(
args
);
return
std
::
string
(
buffer
);
}
cv
::
Mat
fisheyeTest
::
mergeRectification
(
const
cv
::
Mat
&
l
,
const
cv
::
Mat
&
r
)
{
CV_Assert
(
l
.
type
()
==
r
.
type
()
&&
l
.
size
()
==
r
.
size
());
...
...
modules/highgui/src/cap_qtkit.mm
View file @
dcf96b2d
...
...
@@ -450,13 +450,12 @@ double CvCaptureCAM::getProperty(int property_id){
QTFormatDescription* format = [[connections objectAtIndex:0] formatDescription];
NSSize s1 = [[format attributeForKey:QTFormatDescriptionVideoCleanApertureDisplaySizeAttribute] sizeValue];
int width=s1.width, height=s1.height;
switch (property_id) {
case CV_CAP_PROP_FRAME_WIDTH:
retval = width;
retval =
s1.
width;
break;
case CV_CAP_PROP_FRAME_HEIGHT:
retval = height;
retval =
s1.
height;
break;
default:
retval = 0;
...
...
@@ -1013,22 +1012,22 @@ bool CvVideoWriter_QT::writeFrame(const IplImage* image) {
cvCvtColor(image, argbimage, CV_BGR2BGRA);
unsigned char* imagedata = (unsigned char*)argbimage->imageData;
unsigned char* imagedata
_
= (unsigned char*)argbimage->imageData;
//BGRA --> ARGB
for (int j = 0; j < argbimage->height; j++) {
int rowstart = argbimage->widthStep * j;
for (int i = rowstart; i < rowstart+argbimage->widthStep; i+=4) {
unsigned char temp = imagedata[i];
imagedata[i] = 255;
imagedata[i+3] = temp;
temp = imagedata[i+2];
imagedata
[i+2] = imagedata
[i+1];
imagedata[i+1] = temp;
unsigned char temp = imagedata
_
[i];
imagedata
_
[i] = 255;
imagedata
_
[i+3] = temp;
temp = imagedata
_
[i+2];
imagedata
_[i+2] = imagedata_
[i+1];
imagedata
_
[i+1] = temp;
}
}
NSBitmapImageRep* imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&imagedata
NSBitmapImageRep* imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&imagedata
_
pixelsWide:movieSize.width
pixelsHigh:movieSize.height
bitsPerSample:8
...
...
modules/ocl/include/opencv2/ocl/cl_runtime/cl_runtime.hpp
View file @
dcf96b2d
...
...
@@ -6,6 +6,17 @@
#if defined(HAVE_OPENCL_STATIC)
#if defined __APPLE__
// APPLE ignores CL_USE_DEPRECATED_OPENCL_1_1_APIS so use this hack:
#include <OpenCL/cl_platform.h>
#ifdef CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
#undef CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
#endif
#ifdef CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
#undef CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
#endif
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
...
...
modules/superres/test/test_superres.cpp
View file @
dcf96b2d
...
...
@@ -278,6 +278,16 @@ TEST_F(SuperResolution, BTVL1_GPU)
#if defined(HAVE_OPENCV_OCL) && defined(HAVE_OPENCL)
TEST_F
(
SuperResolution
,
BTVL1_OCL
)
{
try
{
const
cv
::
ocl
::
DeviceInfo
&
dev
=
cv
::
ocl
::
Context
::
getContext
()
->
getDeviceInfo
();
std
::
cout
<<
"Device name:"
<<
dev
.
deviceName
<<
std
::
endl
;
}
catch
(...)
{
std
::
cout
<<
"Device name: N/A"
<<
std
::
endl
;
return
;
// skip test
}
RunTest
(
cv
::
superres
::
createSuperResolution_BTVL1_OCL
());
}
#endif
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