Merge commit '43aec5ad' into merge-2.4
Conflicts: cmake/OpenCVConfig.cmake cmake/OpenCVLegacyOptions.cmake modules/contrib/src/retina.cpp modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst modules/gpu/doc/video.rst modules/gpu/src/speckle_filtering.cpp modules/python/src2/cv2.cv.hpp modules/python/test/test2.py samples/python/watershed.py
This commit is contained in:
@@ -1325,4 +1325,3 @@ bool CvVideoWriter_AVFoundation::writeFrame(const IplImage* iplimage) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -96,4 +96,3 @@ typedef int (*Read_InputMediaStream_FFMPEG_Plugin)(struct InputMediaStream_FFMPE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -491,4 +491,3 @@
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;};
|
||||
|
||||
- (CVPixelBufferRef) pixelBufferFromCGImage: (CGImageRef) image
|
||||
{
|
||||
|
||||
|
||||
CGSize frameSize = CGSizeMake(CGImageGetWidth(image), CGImageGetHeight(image));
|
||||
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:NO], kCVPixelBufferCGImageCompatibilityKey,
|
||||
@@ -399,23 +399,23 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;};
|
||||
frameSize.height, kCVPixelFormatType_32ARGB, (CFDictionaryRef) CFBridgingRetain(options),
|
||||
&pxbuffer);
|
||||
NSParameterAssert(status == kCVReturnSuccess && pxbuffer != NULL);
|
||||
|
||||
|
||||
CVPixelBufferLockBaseAddress(pxbuffer, 0);
|
||||
void *pxdata = CVPixelBufferGetBaseAddress(pxbuffer);
|
||||
|
||||
|
||||
|
||||
|
||||
CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB();
|
||||
CGContextRef context = CGBitmapContextCreate(pxdata, frameSize.width,
|
||||
frameSize.height, 8, 4*frameSize.width, rgbColorSpace,
|
||||
kCGImageAlphaPremultipliedFirst);
|
||||
|
||||
|
||||
CGContextDrawImage(context, CGRectMake(0, 0, CGImageGetWidth(image),
|
||||
CGImageGetHeight(image)), image);
|
||||
CGColorSpaceRelease(rgbColorSpace);
|
||||
CGContextRelease(context);
|
||||
|
||||
|
||||
CVPixelBufferUnlockBaseAddress(pxbuffer, 0);
|
||||
|
||||
|
||||
return pxbuffer;
|
||||
}
|
||||
|
||||
@@ -616,4 +616,3 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;};
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ It has been tested with the motempl sample program
|
||||
First Patch: August 24, 2004 Travis Wood TravisOCV@tkwood.com
|
||||
For Release: OpenCV-Linux Beta4 opencv-0.9.6
|
||||
Tested On: LMLBT44 with 8 video inputs
|
||||
Problems? Post your questions at answers.opencv.org,
|
||||
Problems? Post your questions at answers.opencv.org,
|
||||
Report bugs at code.opencv.org,
|
||||
Submit your fixes at https://github.com/Itseez/opencv/
|
||||
Patched Comments:
|
||||
|
||||
@@ -3026,7 +3026,7 @@ double CvCaptureFile_MSMF::getProperty(int property_id)
|
||||
return ((double)captureFormats[captureFormatIndex].MF_MT_FRAME_RATE_NUMERATOR) /
|
||||
((double)captureFormats[captureFormatIndex].MF_MT_FRAME_RATE_DENOMINATOR);
|
||||
}
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -3062,7 +3062,7 @@ IplImage* CvCaptureFile_MSMF::retrieveFrame(int)
|
||||
|
||||
if(RIOut && size == RIOut->getSize())
|
||||
{
|
||||
videoInput::processPixels(RIOut->getpPixels(), (unsigned char*)frame->imageData, width,
|
||||
videoInput::processPixels(RIOut->getpPixels(), (unsigned char*)frame->imageData, width,
|
||||
height, bytes, false, verticalFlip);
|
||||
}
|
||||
|
||||
@@ -3532,4 +3532,4 @@ CvVideoWriter* cvCreateVideoWriter_MSMF( const char* filename, int fourcc,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -411,9 +411,9 @@ int CvCaptureCAM::startCaptureDevice(int cameraNum) {
|
||||
|
||||
void CvCaptureCAM::setWidthHeight() {
|
||||
NSAutoreleasePool* localpool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
|
||||
[mCaptureSession stopRunning];
|
||||
|
||||
|
||||
NSDictionary* pixelBufferOptions = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithDouble:1.0*width], (id)kCVPixelBufferWidthKey,
|
||||
[NSNumber numberWithDouble:1.0*height], (id)kCVPixelBufferHeightKey,
|
||||
@@ -422,9 +422,9 @@ void CvCaptureCAM::setWidthHeight() {
|
||||
nil];
|
||||
|
||||
[mCaptureDecompressedVideoOutput setPixelBufferAttributes:pixelBufferOptions];
|
||||
|
||||
|
||||
[mCaptureSession startRunning];
|
||||
|
||||
|
||||
grabFrame(60);
|
||||
[localpool drain];
|
||||
}
|
||||
@@ -1044,4 +1044,3 @@ bool CvVideoWriter_QT::writeFrame(const IplImage* image) {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ It has been tested with the motempl sample program
|
||||
First Patch: August 24, 2004 Travis Wood TravisOCV@tkwood.com
|
||||
For Release: OpenCV-Linux Beta4 opencv-0.9.6
|
||||
Tested On: LMLBT44 with 8 video inputs
|
||||
Problems? Post your questions at answers.opencv.org,
|
||||
Problems? Post your questions at answers.opencv.org,
|
||||
Report bugs at code.opencv.org,
|
||||
Submit your fixes at https://github.com/Itseez/opencv/
|
||||
Patched Comments:
|
||||
|
||||
@@ -218,7 +218,7 @@ void CvCaptureCAM_XIMEA::resetCvImage()
|
||||
default :
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
cvZero(frame);
|
||||
}
|
||||
/**********************************************************************************/
|
||||
@@ -348,4 +348,4 @@ int CvCaptureCAM_XIMEA::getBpp()
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************/
|
||||
/**********************************************************************************/
|
||||
|
||||
@@ -16,4 +16,4 @@ The license does not permit the following uses:
|
||||
|
||||
You may not use, or allow anyone else to use the icons to create pornographic, libelous, obscene, or defamatory material.
|
||||
|
||||
All icon files are provided "as is". You agree not to hold IconEden.com liable for any damages that may occur due to use, or inability to use, icons or image data from IconEden.com.
|
||||
All icon files are provided "as is". You agree not to hold IconEden.com liable for any damages that may occur due to use, or inability to use, icons or image data from IconEden.com.
|
||||
|
||||
@@ -563,4 +563,3 @@ bool BmpEncoder::write( const Mat& img, const std::vector<int>& )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -44,21 +44,21 @@
|
||||
#include "precomp.hpp"
|
||||
|
||||
UIImage* MatToUIImage(const cv::Mat& image) {
|
||||
|
||||
|
||||
NSData *data = [NSData dataWithBytes:image.data
|
||||
length:image.elemSize()*image.total()];
|
||||
|
||||
|
||||
CGColorSpaceRef colorSpace;
|
||||
|
||||
|
||||
if (image.elemSize() == 1) {
|
||||
colorSpace = CGColorSpaceCreateDeviceGray();
|
||||
} else {
|
||||
colorSpace = CGColorSpaceCreateDeviceRGB();
|
||||
}
|
||||
|
||||
|
||||
CGDataProviderRef provider =
|
||||
CGDataProviderCreateWithCFData((__bridge CFDataRef)data);
|
||||
|
||||
|
||||
// Creating CGImage from cv::Mat
|
||||
CGImageRef imageRef = CGImageCreate(image.cols,
|
||||
image.rows,
|
||||
@@ -73,14 +73,14 @@ UIImage* MatToUIImage(const cv::Mat& image) {
|
||||
false,
|
||||
kCGRenderingIntentDefault
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
// Getting UIImage from CGImage
|
||||
UIImage *finalImage = [UIImage imageWithCGImage:imageRef];
|
||||
CGImageRelease(imageRef);
|
||||
CGDataProviderRelease(provider);
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
|
||||
|
||||
return finalImage;
|
||||
}
|
||||
|
||||
@@ -114,4 +114,4 @@ void UIImageToMat(const UIImage* image,
|
||||
image.CGImage);
|
||||
CGContextRelease(contextRef);
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2474,7 +2474,7 @@ void DefaultViewPort::saveView()
|
||||
if (!fileName.isEmpty()) //save the picture
|
||||
{
|
||||
QString extension = fileName.right(3);
|
||||
|
||||
|
||||
// Create a new pixmap to render the viewport into
|
||||
QPixmap viewportPixmap(viewport()->size());
|
||||
viewport()->render(&viewportPixmap);
|
||||
|
||||
Reference in New Issue
Block a user