here is the result panorama which i had created,using opencv's stitching_detail.cpp

↧
I have create a panorama,but the final panorama has a pixel gap,why?is it a bug?
↧
KeypointBasedMotionEstimator - C++
Hello everyone !
I'm having problems with the KeypointBasedMotionEstimator class.
I don't understand how to instanciate that class. The constructor is :
KeypointBasedMotionEstimator(Ptr estimator)
And this is my main :
int main(int argc, char **argv)
{
MotionModel mm = MM_AFFINE;
Ptr estimator;
estimator->setMotionModel(mm);
KeypointBasedMotionEstimator kbme = KeypointBasedMotionEstimator(estimator);
return 0;
}
I get "segmentation fault (core dumped)"
I think the error comes from `Ptr estimator` , my initialization is probably bad and I'm not familiar with abstract class.
Any ideas is welcome.
Thank you in advance !!
↧
↧
Extract object from the image of a box having object.
Hello Everyone,
I have a box, transparent from the front and i am placing camera on the front transparent panel to capture the image of the internal, most of the time the box is empty, but suppose someone places an object inside this box, then i have to just extract this object from the image captured.
(My real aim is to recognize the object placed inside the box, but first step is to extract the object and then extract features to generate a training model, but for now i am only interested in extracting the object from the image)
I am new to OpenCV and using it with Python and used found few OpenCV functions which can help me.
* GrabCut, this works perfectly for me, i am able to just extract the object, provided that i mark the rectangle over the object, but as object can be anywhere inside the box so its not possible to draw the exact size rectangle of the object.
* Difference of Image, Since i have empty cavity box image and when the object is present, i can cv2.absdiff function to calculate the difference between the image, but this doesn't work properly in most of the cases, as it uses pixel by pixel difference calculations, and due to this results are weird, plus change in light conditions also makes it difficult.
* Back Ground Subtraction, i read few post on this and it looks this is what i need, but the example i got is of video, and i didn't understand how to make it work with just two images.
The code for back ground subtraction is as follow, even it doesn't work that much properly for short distances.
cap = cv2.VideoCapture(0)
fgbg = cv2.createBackgroundSubtractorMOG2()
fgbg2 = cv2.createBackgroundSubtractorKNN()
while True:
ret, frame = cap.read()
cv2.namedWindow('Real', cv2.WINDOW_NORMAL)
cv2.namedWindow('MOG2', cv2.WINDOW_NORMAL)
cv2.namedWindow('KNN', cv2.WINDOW_NORMAL)
cv2.namedWindow('MOG2_ERODE', cv2.WINDOW_NORMAL)
cv2.namedWindow('KNN_ERODE', cv2.WINDOW_NORMAL)
cv2.imshow('Real', frame)
fgmask = fgbg.apply(frame)
fgmask2 = fgbg2.apply(frame)
kernel = np.ones((3,3), np.uint8)
fgmask_erode = cv2.erode(fgmask,kernel,iterations = 1)
fgmask2_erode = cv2.erode(fgmask2,kernel,iterations = 1)
cv2.imshow('MOG2',fgmask)
cv2.imshow('KNN',fgmask2)
cv2.imshow('MOG2_ERODE',fgmask_erode)
cv2.imshow('KNN_ERODE',fgmask2_erode)
k = cv2.waitKey(30) & 0xff
if k == 27:
break
cap.release()
cv2.destroyAllWindows()
Can anyone please help in this topic, and also how to modify the above code to just use the two images, when i tried i get blank images.
Thanks in Advance.
↧
network stream udp
I want to process and display a network rtsp stream that is created from a raspberry camera.
I have this code:
#include
#include
#include
#include
int main(int argc, char** argv) {
cv::VideoCapture * stream = new cv::VideoCapture("rtsp://192.168.55.151:8554/");
if (!stream->isOpened()) return -1;
cv::namedWindow("rtsp_stream", CV_WINDOW_AUTOSIZE);
cv::Mat frame;
while (true) {
if (!stream->read(frame)) return -1;
cv::imshow("rtsp_stream", frame);
cv::waitKey(15);
}
return 1;
}
When the stream is not live, the execution of this results in:
[tcp @ 0xa12480] Connection to tcp://192.168.55.151:8554?timeout=0 failed: Connection refused
Which means that the stream tries to connect with tcp. When the stream is live, the execution results in:
[rtsp @ 0xb07960] method SETUP failed: 461 Client error
From internet research i found that the problem may be that the stream uses udp. If i change the URL to:
"udp://192.168.55.151:8554/"
Then the execution freezes in the `cv::VideoCapture("udp://192.168.55.151:8554/");`
How can i solve my problem?
Edit 1: VLC is able to open the stream.
Edit 2: As i am given to understand, ffmpeg is used to decode the stream. When i run:
ffmpeg -rtsp_transport udp -i rtsp://192.168.55.151:8554/ -t 5 test.mpg
the stream decoding and saving is successful. So how can i specify the lower level protocol to be udp?
Edit 3: If i use the ffmpeg command with tcp instead of udp, i get the same error with the c++ code, 461 client error
↧
Detecting object in video stream in real time and using OCR for text extraction
I'm looking for a way to detect a business card in a video stream (just like human face detection) and extract the email and phone number using once the business card is detected.
I'll use Tesseract for text extraction, my main problem actually is to be able to recognize the card, i've did it through Sift and Surf: they onverconsume the cpu and they have poor training to detect multiple cards.
I'm looking for a way to make the detection very quick and fluid.
Thanks !
↧
↧
'Tracker': undeclared identifier in (OpenCV with Extra Modules)
I got opencv 3.2 (with extra modules) built successfully in Visual Studio (2015). I am trying to build a code that uses the tracking module and especially the TrackerKCF. However, the compiler cannot recognize this library as appears in errors.
I have added the following dependencies in Linker>Input>Additional Dependencies:
opencv_aruco320d.lib
opencv_bgsegm320d.lib
opencv_bioinspired320d.lib
opencv_calib3d320d.lib
opencv_ccalib320d.lib
opencv_core320d.lib
opencv_datasets320d.lib
opencv_dnn320d.lib
opencv_dpm320d.lib
opencv_face320d.lib
opencv_features2d320d.lib
opencv_flann320d.lib
opencv_fuzzy320d.lib
opencv_hdf320d.lib
opencv_highgui320d.lib
opencv_imgcodecs320d.lib
opencv_imgproc320d.lib
opencv_line_descriptor320d.lib
opencv_ml320d.lib
opencv_objdetect320d.lib
opencv_optflow320d.lib
opencv_phase_unwrapping320d.lib
opencv_photo320d.lib
opencv_plot320d.lib
opencv_reg320d.lib
opencv_rgbd320d.lib
opencv_saliency320d.lib
opencv_shape320d.lib
opencv_stereo320d.lib
opencv_stitching320d.lib
opencv_structured_light320d.lib
opencv_superres320d.lib
opencv_surface_matching320d.lib
opencv_text320d.lib
opencv_tracking320d.lib
opencv_video320d.lib
opencv_videoio320d.lib
opencv_videostab320d.lib
opencv_xfeatures2d320d.lib
opencv_ximgproc320d.lib
opencv_xobjdetect320d.lib
opencv_xphoto320d.lib
Part of Code:
delay_toDeleteinFrame.insert(delay_toDeleteinFrame.end(), 0);
Rect a;
a.x = a.y = a.height = a.width = 0;
group_whenOcclusion.insert(group_whenOcclusion.end(), a);
TrackerKCF::Params param;
param.desc_pca = TrackerKCF::MODE::CN | TrackerKCF::MODE::GRAY;
Ptr tracker = TrackerKCF::createTracker(param);
//Ptr tracker = Tracker::create("KCF");
tracker_vector.insert(tracker_vector.end(), tracker);
Errors:
Error C2653 'TrackerKCF': is not a class or namespace name
Error C2065 'Tracker': undeclared identifier
Error C2923 'cv::Ptr': 'TrackerKCF' is not a valid template type argument for parameter 'T'
What could I be missing here?
Thanks in advance
↧
Cannot build opencv_core320d.lib in VS2008
I'm trying to build OpenCV3 using CMake-GUI, Visual Studio 2008 (x86), and Windows 10.
After configuring and generating, I try to build in Visual Studio. Some of the libs build but most don't. This includes core. These are just the core errors:
3>------ Build started: Project: opencv_core, Configuration: Debug Win32 ------
3>Compiling...
3>opencv_core_pch.cpp
3>Compiling...
3>opencl_kernels_core.cpp
3>transpose.cl
3>split_merge.cl
3>set_identity.cl
3>repeat.cl
3>reduce2.cl
3>reduce.cl
3>normalize.cl
3>..\..\..\opencv\modules\core\src\opencl\split_merge.cl(103) : fatal error C1189: #error : "No operation"
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(18) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(60) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\set_identity.cl(56) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\normalize.cl(30) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\reduce2.cl(89) : fatal error C1189: #error : "No operation is specified"
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(18) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(60) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\reduce.cl(555) : fatal error C1189: #error : "No operation"
3>..\..\..\opencv\modules\core\src\opencl\set_identity.cl(56) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\normalize.cl(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(18) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(60) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\set_identity.cl(56) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\normalize.cl(30) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(18) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(18) : error C2182: 'repeat' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(60) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\set_identity.cl(56) : error C2146: syntax error : missing ')' before identifier 'uchar'
3>..\..\..\opencv\modules\core\src\opencl\normalize.cl(30) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(19) : error C2059: syntax error : ')'
3>mulspectrums.cl
3>mixchannels.cl
3>minmaxloc.cl
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(60) : error C2182: 'transpose' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\set_identity.cl(56) : error C2182: 'setIdentity' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\normalize.cl(30) : error C2182: 'normalizek' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(20) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(20) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(33) : warning C4068: unknown pragma
3>..\..\..\opencv\modules\core\src\opencl\repeat.cl(38) : warning C4068: unknown pragma
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(61) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(62) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\normalize.cl(39) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\set_identity.cl(57) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\normalize.cl(40) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(62) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\set_identity.cl(58) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\normalize.cl(40) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(95) : warning C4068: unknown pragma
3>..\..\..\opencv\modules\core\src\opencl\set_identity.cl(58) : error C2447: '{' : missing function header (old-style formal list?)
3>meanstddev.cl
3>lut.cl
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(46) : error C2146: syntax error : missing ';' before identifier 'cmulf'
3>..\..\..\opencv\modules\core\src\opencl\mixchannels.cl(58) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(18) : error C2065: 'MINMAX_STRUCT_ALIGNMENT' : undeclared identifier
3>inrange.cl
3>..\..\..\opencv\modules\core\src\opencl\transpose.cl(109) : warning C4068: unknown pragma
3>..\..\..\opencv\modules\core\src\opencl\set_identity.cl(67) : warning C4068: unknown pragma
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(46) : error C2433: 'float2' : 'inline' not permitted on data declarations
3>..\..\..\opencv\modules\core\src\opencl\mixchannels.cl(58) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(18) : error C2065: 'MINMAX_STRUCT_ALIGNMENT' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\mixchannels.cl(58) : error C2065: 'DECLARE_INPUT_MAT_N' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\mixchannels.cl(58) : error C2146: syntax error : missing ')' before identifier 'DECLARE_OUTPUT_MAT_N'
3>..\..\..\opencv\modules\core\src\opencl\mixchannels.cl(58) : error C2182: 'mixChannels' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(46) : error C2146: syntax error : missing ')' before identifier 'a'
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(50) : warning C4005: 'MIN' : macro redefinition
3> C:\Users\yrazin3\Desktop\OpenCV6\opencv\modules\core\include\opencv2/core/cvdef.h(287) : see previous definition of 'MIN'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(51) : warning C4005: 'MAX' : macro redefinition
3> C:\Users\yrazin3\Desktop\OpenCV6\opencv\modules\core\include\opencv2/core/cvdef.h(291) : see previous definition of 'MAX'
3>..\..\..\opencv\modules\core\src\opencl\mixchannels.cl(58) : error C2059: syntax error : ')'
3>gemm.cl
3>flip.cl
3>..\..\..\opencv\modules\core\src\opencl\inrange.cl(52) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\lut.cl(110) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\meanstddev.cl(34) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\mixchannels.cl(59) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(116) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\inrange.cl(52) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\lut.cl(110) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\meanstddev.cl(34) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(116) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\mixchannels.cl(59) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(46) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\inrange.cl(52) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(116) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\meanstddev.cl(34) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\lut.cl(110) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(47) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\inrange.cl(52) : error C2143: syntax error : missing ')' before 'const'
3>fft.cl
3>..\..\..\opencv\modules\core\src\opencl\gemm.cl(46) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(52) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(116) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\meanstddev.cl(34) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\lut.cl(110) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\inrange.cl(52) : error C2182: 'inrange' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(47) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\gemm.cl(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(52) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(116) : error C2182: 'minmaxloc' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\meanstddev.cl(34) : error C2182: 'meanStdDev' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\lut.cl(110) : error C2182: 'LUT' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(51) : error C2146: syntax error : missing ';' before identifier 'conjf'
3>..\..\..\opencv\modules\core\src\opencl\gemm.cl(46) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(52) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(51) : error C2433: 'float2' : 'inline' not permitted on data declarations
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(124) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\inrange.cl(60) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\meanstddev.cl(39) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\lut.cl(112) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(23) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(51) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\gemm.cl(46) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(52) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(125) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\inrange.cl(61) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\meanstddev.cl(40) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\lut.cl(113) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(51) : error C2086: 'int float2' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(46) : see declaration of 'float2'
3>..\..\..\opencv\modules\core\src\opencl\gemm.cl(46) : error C2182: 'gemm' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(52) : error C2182: 'arithm_flip_rows' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\minmaxloc.cl(125) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\inrange.cl(61) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\meanstddev.cl(40) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\lut.cl(113) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(51) : error C2146: syntax error : missing ')' before identifier 'a'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : error C2146: syntax error : missing ';' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\gemm.cl(49) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(51) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\inrange.cl(100) : warning C4068: unknown pragma
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : error C2146: syntax error : missing ';' before identifier 'mul_complex'
3>..\..\..\opencv\modules\core\src\opencl\gemm.cl(50) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(51) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(52) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(54) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\gemm.cl(50) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(52) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : error C2146: syntax error : missing ')' before identifier 'a'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(55) : error C2143: syntax error : missing ';' before '{'
3>cvtclr_dx.cl
3>copyset.cl
3>copymakeborder.cl
3>opencl_core.cpp
3>opencl_clamdfft.cpp
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(56) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(55) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(56) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(66) : warning C4068: unknown pragma
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(56) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(83) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(56) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(56) : error C2182: 'mulAndScaleSpectrums' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(83) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(83) : error C2086: 'int __kernel' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\flip.cl(52) : see declaration of '__kernel'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(59) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(28) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(65) : error C2144: syntax error : 'float' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\copymakeborder.cl(93) : fatal error C1189: #error : "No extrapolation method"
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(115) : error C2144: syntax error : 'void' should be preceded by ';'
3>opencl_clamdblas.cpp
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(83) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(60) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(115) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(83) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\mulspectrums.cl(60) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C2374: '__attribute__' : redefinition; multiple initialization
3> ..\..\..\opencv\modules\core\src\opencl\fft.cl(23) : see declaration of '__attribute__'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(83) : error C2182: 'arithm_flip_rows_cols' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(115) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C2146: syntax error : missing ';' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(85) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(115) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(74) : error C2144: syntax error : 'float' should be preceded by ';'
3>va_intel.cpp
3>umatrix.cpp
3>types.cpp
3>tables.cpp
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C2146: syntax error : missing ';' before identifier 'twiddle'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(86) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(115) : error C2182: 'setMask' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(74) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(86) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(74) : error C2086: 'int __constant' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(65) : see declaration of '__constant'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C2086: 'int CT' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\fft.cl(24) : see declaration of 'CT'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(97) : warning C4068: unknown pragma
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C2146: syntax error : missing ')' before identifier 'a'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(129) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(75) : error C2144: syntax error : 'float' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(129) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(117) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\umatrix.cpp(391) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=int
3> ]
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(75) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(129) : error C2086: 'int __kernel' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\flip.cl(52) : see declaration of '__kernel'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(118) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(75) : error C2086: 'int __constant' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(65) : see declaration of '__constant'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(129) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(29) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(118) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(129) : error C2143: syntax error : missing ')' before 'const'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(33) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(76) : error C2144: syntax error : 'float' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(129) : error C2182: 'arithm_flip_cols' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(34) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(76) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(138) : error C2144: syntax error : 'void' should be preceded by ';'
3>system.cpp
3>stl.cpp
3>stat.cpp
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(34) : error C2146: syntax error : missing ')' before identifier 'a0'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(76) : error C2086: 'int __constant' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(65) : see declaration of '__constant'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(131) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(138) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(34) : error C2182: 'butterfly2' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(132) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(77) : error C2144: syntax error : 'float' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(138) : error C2086: 'int __kernel' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\copyset.cl(115) : see declaration of '__kernel'
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(132) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(77) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(35) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(138) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\flip.cl(143) : warning C4068: unknown pragma
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(77) : error C2086: 'int __constant' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(65) : see declaration of '__constant'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(36) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(138) : error C2146: syntax error : missing ')' before identifier 'uchar'
3>split.cpp
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(45) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(78) : error C2144: syntax error : 'float' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(138) : error C2182: 'set' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(46) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(78) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(46) : error C2146: syntax error : missing ')' before identifier 'a0'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(139) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(78) : error C2086: 'int __constant' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(65) : see declaration of '__constant'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(46) : error C2182: 'butterfly4' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(140) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\copyset.cl(140) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(47) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(48) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(79) : error C2144: syntax error : 'float' should be preceded by ';'
3>rand.cpp
3>persistence.cpp
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(67) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(79) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(68) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(79) : error C2086: 'int __constant' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(65) : see declaration of '__constant'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(68) : error C2146: syntax error : missing ')' before identifier 'a0'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(68) : error C2182: 'butterfly3' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(69) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(84) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(70) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(84) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(85) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(85) : error C2065: 'read_only' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(86) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(86) : error C2146: syntax error : missing ')' before identifier 'a0'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(86) : error C2182: 'butterfly5' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(85) : error C2146: syntax error : missing ')' before identifier 'image2d_t'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(85) : error C2182: 'YUV2BGR_NV12_8u' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(87) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(88) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(90) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(126) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(91) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(127) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(91) : error C2447: '{' : missing function header (old-style formal list?)
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(127) : error C2065: '__local' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(127) : error C2146: syntax error : missing ')' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(127) : error C2182: 'fft_radix2' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(157) : error C2144: syntax error : 'float' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(127) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(128) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(157) : error C2086: 'int __constant' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(65) : see declaration of '__constant'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(145) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(165) : error C2144: syntax error : 'void' should be preceded by ';'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(146) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(165) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(146) : error C2065: '__local' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(165) : error C2086: 'int __kernel' : redefinition
3> ..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(84) : see declaration of '__kernel'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(146) : error C2146: syntax error : missing ')' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(166) : error C2065: '__global' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(146) : error C2182: 'fft_radix2_B2' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(166) : error C2144: syntax error : 'unsigned char' should be preceded by ')'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(166) : error C2448: 'BGR2YUV_NV12_8u' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(167) : error C2062: type 'int' unexpected
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(146) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(171) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(147) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\cvtclr_dx.cl(172) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(168) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(169) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\persistence.cpp(1372) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=char
3> ]
3>pca.cpp
3>parallel_pthreads.cpp
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(169) : error C2065: '__local' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(169) : error C2146: syntax error : missing ')' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(169) : error C2182: 'fft_radix2_B3' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(169) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(170) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(194) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(195) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(195) : error C2065: '__local' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(195) : error C2146: syntax error : missing ')' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(195) : error C2182: 'fft_radix2_B4' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(195) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(196) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(224) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(225) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(225) : error C2065: '__local' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(225) : error C2146: syntax error : missing ')' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\persistence.cpp(1397) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>parallel.cpp
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(225) : error C2182: 'fft_radix2_B5' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(225) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(226) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(257) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(258) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(258) : error C2065: '__local' : undeclared identifier
3>..\..\..\opencv\modules\core\src\persistence.cpp(1414) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(258) : error C2146: syntax error : missing ')' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(258) : error C2182: 'fft_radix4' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(258) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(259) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(275) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(276) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(276) : error C2065: '__local' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(276) : error C2146: syntax error : missing ')' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(276) : error C2182: 'fft_radix4_B2' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\persistence.cpp(2351) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=char
3> ]
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(276) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(277) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(298) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(299) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(299) : error C2065: '__local' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(299) : error C2146: syntax error : missing ')' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(299) : error C2182: 'fft_radix4_B3' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(299) : error C2059: syntax error : ')'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(300) : error C2143: syntax error : missing ';' before '{'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(324) : error C2065: 'always_inline' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(325) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(325) : error C2065: '__local' : undeclared identifier
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(325) : error C2146: syntax error : missing ')' before identifier 'CT'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(325) : error C2182: 'fft_radix8' : illegal use of type 'void'
3>..\..\..\opencv\modules\core\src\opencl\fft.cl(325) : fatal error C1003: error count exceeds 100; stopping compilation
3>..\..\..\opencv\modules\core\src\persistence.cpp(2376) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>..\..\..\opencv\modules\core\src\persistence.cpp(2393) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>ovx.cpp
3>out.cpp
3>..\..\..\opencv\modules\core\src\persistence.cpp(3489) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=char
3> ]
3>..\..\..\opencv\modules\core\src\persistence.cpp(3508) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>..\..\..\opencv\modules\core\src\persistence.cpp(3523) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>opengl.cpp
3>..\..\..\opencv\modules\core\src\persistence.cpp(7690) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=char
3> ]
3>..\..\..\opencv\modules\core\src\persistence.cpp(7707) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>..\..\..\opencv\modules\core\src\persistence.cpp(7751) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>..\..\..\opencv\modules\core\src\persistence.cpp(7790) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>..\..\..\opencv\modules\core\src\persistence.cpp(7876) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>..\..\..\opencv\modules\core\src\persistence.cpp(7884) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>..\..\..\opencv\modules\core\src\persistence.cpp(7895) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=uchar
3> ]
3>ocl.cpp
3>merge.cpp
3>matrix_decomp.cpp
3>matrix.cpp
3>..\..\..\opencv\modules\core\src\matrix.cpp(444) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=int
3> ]
3>..\..\..\opencv\modules\core\src\matrix.cpp(555) : error C2039: 'data' : is not a member of 'std::vector<_Ty>'
3> with
3> [
3> _Ty=int
3> ]
3>matop.cpp
3>matmul.cpp
3>mathfuncs_core.cpp
3>..\..\..\opencv\modules\core\src\ocl.cpp(4529) : warning C4127: conditional expression is constant
3>mathfuncs.cpp
3>lpsolver.cpp
3>lda.cpp
3>lapack.cpp
3>kmeans.cpp
3>hal_internal.cpp
3>gl_core_3_1.cpp
3>glob.cpp
3>dxt.cpp
3>downhill_simplex.cpp
3>directx.cpp
3>datastructs.cpp
3>cuda_stream.cpp
3>cuda_info.cpp
3>cuda_host_mem.cpp
3>cuda_gpu_mat.cpp
3>copy.cpp
3>convert.cpp
3>conjugate_gradient.cpp
3>command_line_parser.cpp
3>array.cpp
3>arithm.cpp
3>alloc.cpp
3>algorithm.cpp
3>version_string.inc
3>.\version_string.inc(1) : error C2059: syntax error : 'string'
3>Build log was saved at "file://c:\Users\yrazin3\Desktop\OpenCV6\build2\modules\core\opencv_core.dir\Debug\BuildLog.htm"
3>opencv_core - 322 error(s), 12 warning(s)
4>------ Build started: Project: opencv_imgproc, Configuration: Debug Win32 ------
5>------ Build started: Project: opencv_flann, Configuration: Debug Win32 ------
6>------ Build started: Project: opencv_viz, Configuration: Debug Win32 ------
7>------ Build started: Project: opencv_ml, Configuration: Debug Win32 ------
5>Linking...
7>Linking...
4>Compiling...
6>Compiling...
5>LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\opencv_core320d.lib'
7>LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\opencv_core320d.lib'
Any ideas?
↧
Memory leak while using cv2.VideoCapture()
I am trying to video stream from a 1920x1080 HD camera with 60fps,using opencv. I am losing 6GB of my memory within the first minute of streaming. Any guidelines on how to fix this issue.
I am using Python 3.4.4, Opencv 3.1.0, Pycharm Community edition and Pyside to generate the GUI> from PySide.QtCore import *
from PySide.QtGui import *
import cv2
import sys
class MainApp(QWidget):
def __init__(self):
QWidget.__init__(self)
self.video_size = QSize(1920, 1080)
self.setup_ui()
self.setup_camera()
def setup_ui(self):
"""Initialize widgets.
"""
self.image_label = QLabel()
self.image_label.setFixedSize(self.video_size)
self.quit_button = QPushButton("Quit")
self.quit_button.clicked.connect(self.close)
self.main_layout = QVBoxLayout()
self.main_layout.addWidget(self.image_label)
self.main_layout.addWidget(self.quit_button)
self.setLayout(self.main_layout)
def setup_camera(self):
"""Initialize camera.
"""
self.capture = cv2.VideoCapture(0)
self.capture.set(cv2.CAP_PROP_FRAME_WIDTH, self.video_size.width())
self.capture.set(cv2.CAP_PROP_FRAME_HEIGHT, self.video_size.height())
self.timer = QTimer()
self.timer.timeout.connect(self.display_video_stream)
self.timer.start(30)
def display_video_stream(self):
"""Read frame from camera and repaint QLabel widget.
"""
_, frame = self.capture.read()
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
image = QImage(frame, frame.shape[1], frame.shape[0],
frame.strides[0], QImage.Format_RGB888)
self.image_label.setPixmap(QPixmap.fromImage(image))
if __name__ == "__main__":
app = QApplication(sys.argv)
win = MainApp()
win.show()
sys.exit(app.exec_())
↧
Installation of OpenCV in a local directory in Ubuntu 16.04
I have successfully installed OpenCV 2.4.13 in a local directory in my system. But, I am unable to run a sample code and it is giving the error -
g++ -L/home/zeus/Libraries/opencv-2.4.13/release/install/lib -I/home/zeus/Libraries/opencv-2.4.13/release/install/include test.cpp -o test
/tmp/ccUdWpdH.o: In function `main':
test.cpp:(.text+0xb9): undefined reference to `cv::imread(std::__cxx11::basic_string, std::allocator> const&, int)'
test.cpp:(.text+0xe1): undefined reference to `cv::waitKey(int)'
test.cpp:(.text+0x101): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
test.cpp:(.text+0x144): undefined reference to `cv::imshow(std::__cxx11::basic_string, std::allocator> const&, cv::_InputArray const&)'
/tmp/ccUdWpdH.o: In function `cv::Mat::~Mat()':
test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x39): undefined reference to `cv::fastFree(void*)'
/tmp/ccUdWpdH.o: In function `cv::Mat::release()':
test.cpp:(.text._ZN2cv3Mat7releaseEv[_ZN2cv3Mat7releaseEv]+0x47): undefined reference to `cv::Mat::deallocate()'
collect2: error: ld returned 1 exit status
Makefile:9: recipe for target 'test' failed
make: *** [test] Error 1
My OpenCV is installed in /home/zeus/Libraries/opencv-2.4.13/release/install/
**PS - I want to install it locally for some reasons. Please don't tell me to install it in /usr/lib/ as I don't want to do it that way.**
↧
↧
iOS: Trouble initializing BOWImgDescriptorExtractor as top level variable
Hi, I have a function generateBOW that returns a working BOWImgDescriptorExtractor. I want to set this as a top level variable in my ViewController.mm so that I can use it in another method (not viewDidLoad), but when I try, I am getting this error message: *No matching constructor for cv::BOWImgDescriptorExtractor*.
I tried just calling the function at the top level (outside of viewDidLoad), but it gave me this runtime error: *Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)*
How should I initialize bowDE so can I create the object with my function? Here is my code:
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
ImageProc *imgProc = [[ImageProc alloc] init];
BOWImgDescriptorExtractor bowDE; //Error here
Ptr svm;
#pragma mark - System methods
- (void)viewDidLoad {
[super viewDidLoad];
bowDE = [imgProc generateBOW];
svm = [imgProc generateSVM2: bowDE];
}
- (void)processImage:(Mat&)image {
// I want to use bowDE here
}
↧
Is there maven repository for the latest version of opencv(opencv-3.2.0-vc14 )
Hi,
I'm trying to use videoCapture("url IPcamera") with opencv 2.4.9-4 , it works with the webcam but not with IP camera.
So ,I want to use the latest version of opencv, but I can't find it with maven :((
Thanks for your help :)
↧
Removing outliers from Similar Images
Hello..
I am implementing a java program that highlights the difference between two images.
I used the following steps :
1. turning the images into gray scale
2. apply feature detection to the images in order to check if they are similar
3. applying absdiff to them
4. highlighting the difference in the original picture
**My problem is** : when I upload two images that are similar but one of them have outliers, or the position is slightly different , the whole image become different
the code is : ` package image;
import org.opencv.calib3d.Calib3d;
import org.opencv.core.*;
import org.opencv.features2d.*;
import org.opencv.features2d.DMatch;
import org.opencv.features2d.KeyPoint;
import org.opencv.highgui.Highgui;
import org.opencv.imgproc.Imgproc;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Vector;
import javax.imageio.ImageIO;
import javax.swing.JOptionPane;
public class SURFDetector22 {
boolean answer;
//copy matrix
public static Mat imitate(Mat m){
return new Mat(m.height(), m.width(), m.type());
}
//draw rect
public static void drawRotatedRect(Mat image, RotatedRect rotatedRect, Scalar color, int thickness) {
Point[] vertices = new Point[4];
rotatedRect.points(vertices);
MatOfPoint points = new MatOfPoint(vertices);
Imgproc.drawContours(image, Arrays.asList(points), -1, color, thickness);
}
//diff btw matrices
public static Mat diff(Mat mat1, Mat mat2){
Mat dst = imitate(mat1);
Core.absdiff(mat1, mat2, dst);
return dst;}
public void imageComparison(File file1, File file2) throws IOException {
File lib = null;
String os = System.getProperty("os.name");
String bitness = System.getProperty("sun.arch.data.model");
if (os.toUpperCase().contains("WINDOWS")) {
if (bitness.endsWith("64")) {
lib = new File("libs//x64//" + System.mapLibraryName("opencv_java2411"));
} else {
lib = new File("libs//x86//" + System.mapLibraryName("opencv_java2411"));
}
}
System.loadLibrary( Core.NATIVE_LIBRARY_NAME );
///////step 1 : read images
///first image
String bookObject = file1.getAbsolutePath();
Mat objectImage = Highgui.imread(bookObject, Highgui.CV_LOAD_IMAGE_COLOR);
Mat mat1 = new Mat(objectImage.height(),objectImage.width(),CvType.CV_8UC1);
Imgproc.cvtColor(objectImage, mat1, Imgproc.COLOR_RGB2GRAY);
byte[] data1 = new byte[mat1.rows() * mat1.cols() * (int)(mat1.elemSize())];
mat1.get(0, 0, data1);
BufferedImage image1 = new BufferedImage(mat1.cols(),mat1.rows(), BufferedImage.TYPE_BYTE_GRAY);
image1.getRaster().setDataElements(0, 0, mat1.cols(), mat1.rows(), data1);
File ouptut = new File("gray//1.jpg");
ImageIO.write(image1, "jpg", ouptut);
//bade a3ml show la hyde el sora
//2nd image
String bookScene = file2.getAbsolutePath();
Mat sceneImage = Highgui.imread(bookScene, Highgui.CV_LOAD_IMAGE_COLOR);
Mat mat2 = new Mat(sceneImage.height(),sceneImage.width(),CvType.CV_8UC1);
Imgproc.cvtColor(sceneImage, mat2, Imgproc.COLOR_RGB2GRAY );
byte[] data2 = new byte[mat2.rows() * mat2.cols() * (int)(mat2.elemSize())];
mat2.get(0, 0, data2);
BufferedImage image2 = new BufferedImage(mat2.cols(),mat2.rows(), BufferedImage.TYPE_BYTE_GRAY);
image2.getRaster().setDataElements(0, 0, mat2.cols(), mat2.rows(), data2);
File ouptut2 = new File("gray//2.jpg");
ImageIO.write(image2, "jpg", ouptut2);
//////step 2 : Detect and extract features
MatOfKeyPoint objectKeyPoints = new MatOfKeyPoint();
FeatureDetector featureDetector = FeatureDetector.create(FeatureDetector.SURF);
System.out.println("Detecting key points...");
featureDetector.detect(mat1, objectKeyPoints);
System.out.println("----- key pointss image 1----" + objectKeyPoints);
//KeyPoint[] keypoints = objectKeyPoints.toArray();
System.out.println(objectKeyPoints);
MatOfKeyPoint objectDescriptors = new MatOfKeyPoint();
DescriptorExtractor descriptorExtractor = DescriptorExtractor.create(DescriptorExtractor.SURF);
System.out.println("Computing descriptors...");
descriptorExtractor.compute(objectImage, objectKeyPoints, objectDescriptors);
// Create the matrix for output image.
Mat outputImage = new Mat(objectImage.rows(), objectImage.cols(), Highgui.CV_LOAD_IMAGE_COLOR);
Scalar newKeypointColor = new Scalar(255, 0, 0);
System.out.println("Drawing key points on object image...");
Features2d.drawKeypoints(objectImage, objectKeyPoints, outputImage, newKeypointColor, 0);
// Match object image with the scene image
MatOfKeyPoint sceneKeyPoints = new MatOfKeyPoint();
MatOfKeyPoint sceneDescriptors = new MatOfKeyPoint();
System.out.println("Detecting key points in background image...");
featureDetector.detect(mat2, sceneKeyPoints);
System.out.println("----img2 key pointys----" + sceneKeyPoints);
System.out.println("Computing descriptors in background image...");
descriptorExtractor.compute(mat2, sceneKeyPoints, sceneDescriptors);
Mat matchoutput = new Mat(mat2.rows() * 2, mat2.cols() * 2, Highgui.CV_LOAD_IMAGE_COLOR);
Scalar matchestColor = new Scalar(0, 255, 0);
List matches = new LinkedList();
DescriptorMatcher descriptorMatcher = DescriptorMatcher.create(DescriptorMatcher.FLANNBASED);
System.out.println("Matching object and scene images...");
descriptorMatcher.knnMatch(objectDescriptors, sceneDescriptors, matches, 2);
System.out.println("Calculating good match list...");
LinkedList goodMatchesList = new LinkedList();
float nndrRatio = 0.7f;
for (int i = 0; i < matches.size(); i++) {
MatOfDMatch matofDMatch = matches.get(i);
DMatch[] dmatcharray = matofDMatch.toArray();
DMatch m1 = dmatcharray[0];
DMatch m2 = dmatcharray[1];
if (m1.distance <= m2.distance * nndrRatio) {
goodMatchesList.addLast(m1);
}
}
if (goodMatchesList.size() >= matches.size() - 1) {
System.out.println("Object Found!!!");
answer = true;
List objKeypointlist = objectKeyPoints.toList();
List scnKeypointlist = sceneKeyPoints.toList();
LinkedList objectPoints = new LinkedList<>();
LinkedList scenePoints = new LinkedList<>();
for (int i = 0; i < goodMatchesList.size(); i++) {
objectPoints.addLast(objKeypointlist.get(goodMatchesList.get(i).queryIdx).pt);
scenePoints.addLast(scnKeypointlist.get(goodMatchesList.get(i).trainIdx).pt);
}
MatOfPoint2f objMatOfPoint2f = new MatOfPoint2f();
objMatOfPoint2f.fromList(objectPoints);
MatOfPoint2f scnMatOfPoint2f = new MatOfPoint2f();
scnMatOfPoint2f.fromList(scenePoints);
Mat homography = Calib3d.findHomography(objMatOfPoint2f, scnMatOfPoint2f, Calib3d.RANSAC, 3);
Mat obj_corners = new Mat(4, 1, CvType.CV_32FC2);
Mat scene_corners = new Mat(4, 1, CvType.CV_32FC2);
obj_corners.put(0, 0, new double[] { 0, 0 });
obj_corners.put(1, 0, new double[] { objectImage.cols(), 0 });
obj_corners.put(2, 0, new double[] { objectImage.cols(), objectImage.rows() });
obj_corners.put(3, 0, new double[] { 0, objectImage.rows() });
System.out.println("Transforming object corners to scene corners...");
Core.perspectiveTransform(obj_corners, scene_corners, homography);
Mat img = Highgui.imread(bookScene, Highgui.CV_LOAD_IMAGE_COLOR);
Core.line(img, new Point(scene_corners.get(0, 0)), new Point(scene_corners.get(1, 0)),
new Scalar(0, 255, 0), 4);
Core.line(img, new Point(scene_corners.get(1, 0)), new Point(scene_corners.get(2, 0)),
new Scalar(0, 255, 0), 4);
Core.line(img, new Point(scene_corners.get(2, 0)), new Point(scene_corners.get(3, 0)),
new Scalar(0, 255, 0), 4);
Core.line(img, new Point(scene_corners.get(3, 0)), new Point(scene_corners.get(0, 0)),
new Scalar(0, 255, 0), 4);
System.out.println("Drawing matches image...");
MatOfDMatch goodMatches = new MatOfDMatch();
goodMatches.fromList(goodMatchesList);
Features2d.drawMatches(objectImage, objectKeyPoints, sceneImage, sceneKeyPoints, goodMatches, matchoutput,
matchestColor, newKeypointColor, new MatOfByte(), 2);
// Highgui.imwrite("output//outputImage.jpg", outputImage);
// Highgui.imwrite("output//matchoutput.jpg", matchoutput);
// Highgui.imwrite("output//img.jpg", img);
// File f= new File("output");
Highgui.imwrite("output//1.jpg", outputImage);
Highgui.imwrite("output//2.jpg", matchoutput);
Highgui.imwrite("output//3.jpg", img);
} else {
System.out.println("Object Not Found");
answer = false;
Mat res = diff(mat1,mat2);
byte[] data3 = new byte[res.rows() * res.cols() * (int)(res.elemSize())];
res.get(0, 0, data3);
BufferedImage image3 = new BufferedImage(res.cols(),res.rows(), BufferedImage.TYPE_BYTE_GRAY);
image3.getRaster().setDataElements(0, 0, res.cols(), res.rows(), data3);
File ouptut3 = new File("gray//3.jpg");
ImageIO.write(image3, "jpg", ouptut3);
////////////////////////////
List contours = new ArrayList<>();
Mat dest = Mat.zeros(res.size(), CvType.CV_8UC3);
Scalar white = new Scalar(255, 255, 255);
// Find contours
Imgproc.findContours(res, contours, new Mat(), Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
Scalar green = new Scalar(81, 190, 0);
for (MatOfPoint contour: contours) {
RotatedRect rotatedRect = Imgproc.minAreaRect(new MatOfPoint2f(contour.toArray()));
drawRotatedRect(mat1, rotatedRect, green, 4);
}
byte[] data4 = new byte[mat1.rows() * mat1.cols() * (int)(mat1.elemSize())];
mat1.get(0, 0, data4);
BufferedImage image4 = new BufferedImage(mat1.cols(),mat1.rows(), BufferedImage.TYPE_BYTE_GRAY);
image3.getRaster().setDataElements(0, 0, mat1.cols(), mat1.rows(), data4);
File ouptut4 = new File("gray//4.jpg");
ImageIO.write(image4, "jpg", ouptut4);
/////////////////
}
System.out.println("Ended....");
}
}
`
↧
Unable to open video link
I am trying to use Opencv but it seems that its not installed properly. I am unable to play video thru the below link but can open webcam if I change the "LINK" to zero(0)
import cv2
from cv2 import *
capture = cv2.VideoCapture("LINK")
while True:
ret, img = capture.read()
cv2.imshow('some', img)
if 0xFF & cv2.waitKey(5) == 27:
break
cv2.destroyAllWindows()
getting error as:
File "", line 6, in
cv2.imshow('some', img)
error: ..\..\..\..\opencv\modules\highgui\src\window.cpp:261: error: (-215) size.width>0 && size.height>0 in function cv::imshow
↧
↧
Unable to convert YUV threshold limits to HSV
I want to convert the yuv_min and yuv_max values to hsv_min and hsv_max. My code is as follows
yuv_thresh = [97, 43, 148, 188, 81, 167] // [y_min, u_min, v_min, y_max, u_max, v_max]
cv::Mat rgb_min;
cv::Mat hsv_min;
cv::Mat yuv_min(1,1,CV_8UC3,cv::Scalar(yuv_thresh[0],yuv_thresh[1],yuv_thresh[2]));
cvtColor(yuv_min, rgb_min, cv::COLOR_YUV2BGR);
cvtColor(rgb_min,rgb_min,cv::COLOR_BGR2RGB);
cvtColor(rgb_min, hsv_min, CV_BGR2HSV);
cv::Vec3b hsv_min_vec = hsv_min.at(0,0);
for (int i = 0; i < 3; i++)
{
cout<< "hsv_min: "<< i << " = " <<(float)hsv_min_vec.val[i] << endl;
}
cv::Mat rgb_max;
cv::Mat hsv_max;
cv::Mat yuv_max(1,1,CV_8UC3,cv::Scalar(yuv_thresh[3],yuv_thresh[4],yuv_thresh[5]));
cvtColor(yuv_max, rgb_max, cv::COLOR_YUV2BGR);
cvtColor(rgb_max,rgb_max,cv::COLOR_BGR2RGB);
cvtColor(rgb_max, hsv_max, CV_BGR2HSV);
cv::Vec3b hsv_max_vec = hsv_max.at(0,0);
for (int i = 0; i < 3; i++)
{
cout<< "hsv_max: "<< i << " = " <<(float)hsv_max_vec.val[i] << endl;
}
The output I get is
> hsv_min: 0 = 30> hsv_min: 1 = 255> hsv_min: 2 = 120> hsv_max: 0 = 20> hsv_max: 1 = 154> hsv_max: 2 = 232
It can be seen that hsv_min[1] > hsv_max[1].
Am I doing something wrong in my code?
↧
Forum issue - How to only answer questions?
Hi everybody,
It seems that according to my initial karma rank I can't answer questions. However, I had some answers, along the past few months, to questions I stumbled upon in a google search.
Is there a way to start answering without asking a question first?
Thanks!
↧
opencv4android arm64-v8a version slower than armv7-v7a
hi,
why the opencv official website provide opencv4android armeabi-v7a only and not provide arm64-v8a?
i have compiled the arm64-v8a version from source and find it slower than armeabi-v7a(official version, 2.4.13) when running on android.
are there any tricks on compiling a faster arm64-v8a version?
↧
TrainCascade: Choise of parameters and positive image
Hello,
I want to detect an pen and I used juliu5.com/full.jpg as the positive image. To generate a few hundred positives I used these github.com/handaga/tutorial-haartraining/tree/master/data/negatives and this command.
opencv_createsamples.exe -info C:\TrainingMarker\positives\positives.txt -bg C:\NegativeImages\negatives\bg.txt -img C:\TrainingMarker\images\full.jpg -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -bgcolor 255 -bgthresh 8 -num 1000 -w 132 -h 30
For the -w and -h parameters I divided the **with and height** of my original positive image. Now I have 1000 positives and 2000 negatives so I am ready to train the classifier. (Linux Server)
opencv_traincascade -data TrainingMarker/cascade/ -vec TrainingMarker/objects.vec -bg NegativeImages/negatives/bg.txt -numStages 20 -numPos 1000 -numNeg 2000 -w 132 -h 30 -featureType LBP -minHitRate 0.995 -maxFalseAlarmRate 0.5
However in each Stage there are 3 lines (trained features?) max and my tracking results are really bad...
I am still confused by the **-w and -h** parameters although I read several explanations within the forum. Are my parameters alright?
When I was using -featureType HOG I got about 8 lines of features in each Stage. However this Type is not supported in OpenCV > 3.0.
Is my test object just not detailed enough?
Thank you really much for your help!
↧
↧
Removing shadow with wavelet
Hello guys, I'm trying to enhence and remove shadow from my image.
I guess if I wavelet transform an image and denoise the high frequency part and reconstruct it, I can get an image with high resolution with no weak shadow since it has a lot of information... but I dont know how to prove it, is there anyone who can prove whether its right or wrong?
↧
Import Error: Python unable to detect OpenCV libraries for OpenCV local installation
I have installed OpenCV locally in a directory named /home/zeus/Libraries/opencv-2.4.13/release/install. C++ programs are working fine as I have configured the shared libraries so that they are detected from the local install. However, on running import cv2 in the python shell is giving the following error -
ImportError: Traceback (most recent call last)
in ()
----> 1 import cv2 as cv
ImportError: No module named cv2
Therefore, I need to give some path for python to detect the opencv library cv2.so which is stored in /home/zeus/Libraries/opencv-2.4.13/release/install/lib/python2.7/dist-packages/ which is a local directory. How can I do that?
↧
How can I get index of the gratest element in a Mat
I know that opencv has sort method, but I want to get something like argmax method.
How can I get indices of the gratest element, and second, an third, and so on, from a 2D Mat?
↧