Ask Your Question

atrebbi's profile - activity

2018-12-12 23:24:24 -0500 received badge  Popular Question (source)
2015-05-14 05:49:44 -0500 received badge  Necromancer (source)
2014-06-24 03:04:03 -0500 asked a question Add audio channel to a video created with OpenCv

How can I add an audio channel to a video created with OpenCv ? the audio channel would be a separate audio file, that i should merge with the video file.

2014-06-01 06:48:27 -0500 commented answer Android x86_64 support?

Strange that intel that produces x86-64 and develops opencv did not know about this.

2014-06-01 06:44:18 -0500 received badge  Critic (source)
2014-04-24 09:54:01 -0500 commented answer Android x86_64 support?

ARM is not x86 , they are completely different processors, you'll never need to compile x86_64 to run or debug an android app

2014-04-19 08:23:32 -0500 answered a question iOS opencv2.framework not compile with linker flag -ObjC and -all_load

Change the order of frameworks AVFoundation and OpenCv ; make a full clean ( both clean and clean output folder, this last is visible pressing option in project menu ) and then rebuild

2014-04-19 06:06:17 -0500 answered a question Android x86_64 support?

I thought there's was no plan to release such platform in android and there's not such device actually, why should you need that ?

In iOS , it's available only for simulator that works very differently from android ( that is, the simulator does not emulate hardware but software )

2014-04-14 04:49:09 -0500 commented answer Opencv builds on lab computer, but not laptop.

You should apply some other patches: (1) change build_framework.py and add this at line #43 : "-DCMAKE_C_FLAGS=\"-Wno-implicit-function-declaration\" " + (2) then apply this ptach to modules/world/CMakeLists.txt:84 : http://stackoverflow.com/questions/16983696/how-to-build-opencv-2-4-9-for-ios

let me know ( i will provide the patch to 2.4 branch when i'm sure about this )

Ale

2014-04-14 02:47:26 -0500 received badge  Teacher (source)
2014-04-13 04:57:02 -0500 commented answer Opencv builds on lab computer, but not laptop.

Ok fixed ( works for me). follow these steps: 1) start getting this file : https://raw.githubusercontent.com/Kitware/CMake/master/Modules/CMakeDetermineCompilerId.cmake and substitute the wrong old one ( this contains the patch ). then there are 2 important things: 2) in build_framework.py , change IPHONEOS_DEPLOYMENT_TARGET=7.1 ( was 6.0 ) 3) compile as root ( there are some authorizations issues tryng to create temporary files ) it should build now

2014-04-13 04:31:11 -0500 received badge  Necromancer (source)
2014-04-13 04:31:11 -0500 received badge  Self-Learner (source)
2014-04-13 04:21:32 -0500 answered a question memory leak with VideoWriter

this bug has been fixed .

more info here: http://code.opencv.org/issues/3620

2014-04-09 08:06:58 -0500 answered a question Opencv builds on lab computer, but not laptop.

I think the problem may be xcode 5.1 , i can't compile opencv since last upgrade but the bug is in cmake ( i think ), maybe here : /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake

I tried to apply this patch: http://public.kitware.com/pipermail/cmake-developers/2013-December/009243.html

but I go on having problems...

this is the file that i have modified: https://dl.dropboxusercontent.com/u/20752176/CMakeDetermineCompilerId.cmake

please let me know if you manage to fix and how ( maybe i'm missing something )

2013-04-06 11:32:22 -0500 commented question error with framework built from sources

I have identified the problem: i need a linker option in my project: -all_load with this flag, the opencv framework gives the errors I said i will open a bug...

2013-04-05 11:01:44 -0500 received badge  Editor (source)
2013-04-05 10:59:45 -0500 asked a question error with framework built from sources

I get many errors when i try to build an app with the framework i have built from sources ( listed below ), am I doing some errors ?

duplicate symbol __ZN2cv15SURFFindInvoker17findMaximaInLayerERKNS_3MatES3_RKNSt3__16vectorIS1_NS4_9allocatorIS1_EEEESA_RKNS5_IiNS6_IiEEEERNS5_INS_8KeyPointENS6_ISF_EEEEiifi in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZN2cv4SURFC1Ediibb in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZN2cv4SURFC1Ev in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZN2cv4SURFC2Ediibb in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZN2cv4SURFC2Ev in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURF10detectImplERKNS_3MatERNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEES3_ in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURF11computeImplERKNS_3MatERNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEERS1_ in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURF14descriptorSizeEv in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURF14descriptorTypeEv in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURFclERKNS_11_InputArrayES3_RNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEE in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURFclERKNS_11_InputArrayES3_RNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEERKNS_12_OutputArrayEb in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTCN2cv4SURFE0_NS_15FeatureDetectorE in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTCN2cv4SURFE0_NS_9Feature2DE in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTCN2cv4SURFE4_NS_19DescriptorExtractorE in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTIN2cv4SURFE in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTSN2cv4SURFE in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTTN2cv4SURFE in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTVN2cv4SURFE in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZThn4_NK2cv4SURF11computeImplERKNS_3MatERNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEERS1_ in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZThn4_NK2cv4SURF14descriptorSizeEv in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) duplicate symbol __ZThn4_NK2cv4SURF14descriptorTypeEv in: /Sorgenti/ios/opencv2.framework/opencv2(surf.o) ld: 21 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

2013-03-26 18:01:22 -0500 commented answer memory leak with VideoWriter

Yes i have tried all the commented decoders

I think i have found the problem, trying to patch it ( bug #2918 ), there are a couple of variables that are not released : cap_avfoundation.mm (1316)

//cleanup
NSLog(@"Patch alessandro trebbi");
CFRelease(cfData); 
CVPixelBufferRelease(pixelBuffer);
...

i don't manage to compile the framework correctly and test the patch

2013-03-26 17:46:17 -0500 asked a question opencv.framework that i have compiled has duplicate symbols

I have tried to compile opencv from sources using python script in ios directory, but i have got linker errors ( that i'm not getting using the downloaded compiled framework )

( i just wanted to fix a bug in opencv )

duplicate symbol __ZN2cv15SURFFindInvoker17findMaximaInLayerERKNS_3MatES3_RKNSt3__16vectorIS1_NS4_9allocatorIS1_EEEESA_RKNS5_IiNS6_IiEEEERNS5_INS_8KeyPointENS6_ISF_EEEEiifi in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZN2cv4SURFC1Ev in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURF10detectImplERKNS_3MatERNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEES3_ in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURF11computeImplERKNS_3MatERNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEERS1_ in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURF14descriptorSizeEv in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURF14descriptorTypeEv in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZNK2cv4SURFclERKNS_11_InputArrayES3_RNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEERKNS_12_OutputArrayEb in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTCN2cv4SURFE0_NS_15FeatureDetectorE in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTCN2cv4SURFE0_NS_9Feature2DE in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTCN2cv4SURFE4_NS_19DescriptorExtractorE in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTIN2cv4SURFE in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTSN2cv4SURFE in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTTN2cv4SURFE in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZTVN2cv4SURFE in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZThn4_NK2cv4SURF11computeImplERKNS_3MatERNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEERS1_ in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZThn4_NK2cv4SURF14descriptorSizeEv in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) duplicate symbol __ZThn4_NK2cv4SURF14descriptorTypeEv in: /Sorgenti/opencv/opencv2.framework/opencv2(surf.o) ld: 21 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

2013-03-25 17:27:49 -0500 commented answer memory leak with VideoWriter

Ok, just to be sure i did the changes you said, no difference at all, memory is lost in the same way

    _videoWriter = VideoWriter();
    _videoWriter.open([_videoPath UTF8String],
                                       CV_FOURCC('M','J','P','G'),
                                       //CV_FOURCC('X','V','I','D'),
                                       //CV_FOURCC('F','L','V','1'),
                                       //CV_FOURCC('U','2','6','3'),
                                       //CV_FOURCC('P','I','M','1'),
                                       VIDEO_FPS,
                                       cvSize(288,352));

...

_videoWriter << frame;

( I used pointer to objects, there's nothing strange in it )

2013-03-25 12:24:59 -0500 commented answer memory leak with VideoWriter

I'm using c++ interface, at least I thought so ; how should I substitute _videoWriter->open() ? In any case the part of code that is giving problems is: _videoWriter->write(frame);

i have tried : *_videoWriter << frame; but i have the same problema

2013-03-24 04:38:24 -0500 asked a question memory leak with VideoWriter

I have a problem writing a video in iOS.

I have double checked my code, the problem is just in :

            _videoWriter->write(frame);

each time I call this function, i lose some memory ; it seems to me that the memory is not realeased even after _videoWriter->release() ( only a very little portion )

as i should register long videos, I wanted to try to save the video now and then, but if i close the file i had created (through method release() ) and try to reopen it , i get an error ( in general, it seems to me that if the file i'm trying to open already exists, the function fail, i can only create new video files )

this is the method that adds a frame:

            Mat frame = [MainViewController cvMatWithImage:image];

            _videoWriter->write(frame);

            _nframeswritten++;
            NSLog(@"frames %d/%d", _nframeswritten, _nframes);

this is how i open the video:

    _videoWriter = new VideoWriter();
    _videoWriter->open([_videoPath UTF8String],
                                       CV_FOURCC('M','J','P','G'),
                                       //CV_FOURCC('X','V','I','D'),
                                       //CV_FOURCC('F','L','V','1'),
                                       //CV_FOURCC('U','2','6','3'),
                                       //CV_FOURCC('P','I','M','1'),
                                       VIDEO_FPS,
                                       cvSize(288,352));

at the time i manage to record a video about 2 minutes lenght before it crashes on an iphone4s ( 10 fps, 288x352 )

2013-03-08 06:27:32 -0500 answered a question CvVideoWriter WriteFrame for iOS not working

Change the file extension to m4v and delete existing file before calling cvCreateVideoWriter()

( opencv chooses filetype looking at file extension )