Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[RELEASED] OpenCV for Unity

Discussion in 'Assets and Asset Store' started by EnoxSoftware, Oct 30, 2014.

  1. drewwise

    drewwise

    Joined:
    Jun 16, 2016
    Posts:
    5
    Hi, Enoxsoftware.

    Thank you for your reply.

    Try with the latest version of OpenCVforUnity.

    Thank you.
     
  2. drewwise

    drewwise

    Joined:
    Jun 16, 2016
    Posts:
    5
    I updated the assets to the latest version, but I got the same error and error code.

    - Tools and assets used
    macOS Version : Monterey 12.6.3
    Xcode Version : Version 14.2 (14C18)
    Unity Version : 2019.4.31f1
    OpenCV for Unity 2.5.4
    Dlib Face Landmark Detector 1.3.4

    - Error message
    Please check the screenshot attached.

    How can I resolve this error?
    Thank you.
    Screenshot2023-06-08.png
     
  3. WANHEDA666

    WANHEDA666

    Joined:
    Sep 24, 2019
    Posts:
    3
    Hello! When I start HumanSegmentationExample scene, unity just crashing.
    I use the latest version of the plugin
    Please help
     
    Last edited: Jun 8, 2023
  4. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    - Tools and assets used
    macOS Version : Monterey 12.6.3 Ventura13.3
    Xcode Version : Version 14.2 (14C18)
    Unity Version : 2021.3.21f1 2022.3.1f1
    OpenCV for Unity 2.5.4
    Dlib Face Landmark Detector 1.3.4

    xcode0.png
    xcode1.png
    xcode2.png
     
  5. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    Thank you for your reporting.

    Could you tell me the environment you tested
    OpenCVForUnity version :
    Unity version :
    Editor Platform :
     
  6. WANHEDA666

    WANHEDA666

    Joined:
    Sep 24, 2019
    Posts:
    3
    Thank you for your reply!
    opencv version is 2.5.4
    unity version is 2020.3.13f
    editor platform is macOS Ventura 13.1
     
  7. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    Last edited: Jun 11, 2023
  8. drewwise

    drewwise

    Joined:
    Jun 16, 2016
    Posts:
    5
    Hi, Enoxsoftware.

    Thank you for your reply.
    I wll try the screenshot settings.

    Thank you.
     
  9. drewwise

    drewwise

    Joined:
    Jun 16, 2016
    Posts:
    5
    Hi, Enoxsoftware.

    Thank you for your reply.
    After updating to Unity Version : 2021.3.21f1, the upload to App Store Connect was successful.
    Thank you for teaching me.

    Thank you.
     
    EnoxSoftware likes this.
  10. Sam128

    Sam128

    Joined:
    Nov 21, 2017
    Posts:
    9
    DllNotFoundException: opencvforunity assembly:<unknown assembly> type:<unknown type> member:(null)
    OpenCVForUnity.UnityUtils.Utils.setDebugMode (System.Boolean debugMode, System.Boolean throwException) (at Assets/OpenCVForUnity/org/opencv/unity/Utils.cs:1186)

    Having this error after importing in unity
     
  11. nativehfQ

    nativehfQ

    Joined:
    Nov 1, 2017
    Posts:
    11
  12. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    Thank you for your reporting.

    Can you tell me what environment you tested?
    OpenCVForUnity version :
    Unity version :
    Editor Platform :
     
  13. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    Support for Windows ARM64 has been added in OpenCVForUnity 2.5.5.

    opencvforunity2.5.5_feature.png
     
    nativehfQ likes this.
  14. nativehfQ

    nativehfQ

    Joined:
    Nov 1, 2017
    Posts:
    11
    Thank you so much!
     
  15. xteamsoftware

    xteamsoftware

    Joined:
    Jan 7, 2016
    Posts:
    6
    Hi Enoxsoftware.,
    I am trying to use BOWImgDescriptorExtractor,
    when I try to initialise the class
    pMATCHER = DescriptorMatcher.create( DescriptorMatcher.BRUTEFORCE );
    BOWImgDescriptorExtractor bowDE = BOWImgDescriptorExtractor.__fromPtr__(pMATCHER.getNativeObjAddr());
    Unity editor crashes and even if I compile and run the executable.

    I am using with OpenCVForUnity 2.5.5.and Unity 2020.3.25f
     
  16. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    Thank you very much for reporting.
    OpenCV Java 4.8.0 does not seem to be able to use BOWImgDescriptorExtractor at the moment. This seems to be an error in creating the wrapper.
    https://stackoverflow.com/questions...-bowimgdescripterextractor-compute-in-android
    OpenCVForUnity is a clone of OpenCV java 4.8.0. So the BOWImgDescriptorExtractor class is currently unavailable.
    I am currently investigating if this issue can be corrected.
     
  17. NoraphatTOTO

    NoraphatTOTO

    Joined:
    Jul 23, 2021
    Posts:
    2
  18. MCJeremy87

    MCJeremy87

    Joined:
    Apr 25, 2018
    Posts:
    3
    Hi, Enoxsoftware.
    Unity2022.3.7f1c1
    Opencv2.5.5
    I try to use WebCamToMatHelp+BacksubtorKNN, it dosen;t work.
    /// <summary>
    /// The video capture to mat helper.
    /// </summary>
    WebCamTextureToMatHelper sourceToMatHelper;

    /// <summary>
    /// The background substractor.
    /// </summary>
    BackgroundSubtractor backgroundSubstractor;

    if (sourceToMatHelper!=null&&sourceToMatHelper.IsPlaying() && sourceToMatHelper.DidUpdateThisFrame()){

    Mat rgbMat = sourceToMatHelper.GetMat();
    backgroundSubstractor.apply(rgbMat, fgmaskMat);
    Imgproc.morphologyEx(fgmaskMat, fgmaskMat, Imgproc.MORPH_OPEN, kernel);
    Imgproc.cvtColor(fgmaskMat, rgbMat, Imgproc.COLOR_GRAY2RGB);

    Utils.matToTexture2D(fgmaskMat, texture);
    }
    texture just show black
     
  19. juanca5195

    juanca5195

    Joined:
    Nov 16, 2012
    Posts:
    1
    Hello everyone, I would like to try this tool but I wonder if it is possible to use more than one camera, I have searched the internet and I have seen that it is but I cannot find an implementation in unity3d. I'm thinking of using a combination of character pose estimation and ArUco marks, the idea is to use it for motion capture. If possible I have some questions:

    -Is it possible to use two cameras for character pose estimation? Sometimes there are limbs not visible from one camera.

    -What is the minimum size for the ArUco marks? I know it is relative to the distance from the camera, I will be using it approximately 5 meters away.

    -Can I use a previously recorded video instead of real-time video capture?
     
    Last edited: Sep 2, 2023
  20. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    In the case of restoring an image that has been distorted by perspective, it is easier to use the cv2.warpPerspective method than the cv2.remap method.
    I think the DocumentScannerExample code included in OpenCVForUnity's Example may be helpful.
    https://github.com/EnoxSoftware/Ope...ity/Examples/Advanced/DocumentScannerExample/ DocumentScannerExample.cs
     
  21. NoraphatTOTO

    NoraphatTOTO

    Joined:
    Jul 23, 2021
    Posts:
    2
    I try to use getperspective and warp per spective. But some point is not linear.I want to get every point transform to
    straight line.I found some Example use griddata from python.It like Interpolate.I don't know.How It use in Opencvforunity?
     
  22. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    The following issue has been reported in Unity's ISSUE TRACKER.
    https://issuetracker.unity3d.com/is...s32-returns-black-pixels-when-in-webgl-player

    Most likely this issue is the cause. Could you also try building with Unity2021?
     
  23. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    I have confirmed that I can use multiple cameras by attaching WebCamTextureToMatHelper.cs to multiple game objects.

    -Is it possible to use two cameras for character pose estimation? Sometimes there are limbs not visible from one camera.
    Yes, it is possible.
    -What is the minimum size for the ArUco marks? I know it is relative to the distance from the camera, I will be using it approximately 5 meters away.
    Probably depends on the resolution of the camera and the type of marker. You can try ArUcoExample with the Free Trial Version.
    https://enoxsoftware.com/opencvforunity/get_asset/
    -Can I use a previously recorded video instead of real-time video capture?
    Yes, it is possible.
    https://github.com/EnoxSoftware/Ope...io/VideoCaptureExample/VideoCaptureExample.cs
     
    juanca5195 likes this.
  24. MCJeremy87

    MCJeremy87

    Joined:
    Apr 25, 2018
    Posts:
    3
  25. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
    Download Failure: Assets/OpenCVForUnity/StreamingAssets/OpenCVForUnity/dnn/colorization_release_v2.caffemodel HTTP/1.1 403 Forbidden

    on
    Unity 2021.3.25f1
    MAC M1
     
    havokentity likes this.
  26. havokentity

    havokentity

    Joined:
    Sep 25, 2017
    Posts:
    38

    I'm getting this error on Unity 2022.3.8f1, Windows when downloading example assets
     
  27. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    Thanks for the report.
    We have confirmed the broken download link issue for the colorization model. This will be fixed in the next version.
    Please download and place the model directly from the following URL.
    https://github.com/EnoxSoftware/Ope...ionExample/colorization_release_v2.caffemodel
     
  28. gromiczek

    gromiczek

    Joined:
    Jul 19, 2019
    Posts:
    25
    Hello, I've been using blob detection and would like to limit the area of the mat that's analyzed because the relevant blobs will only ever show up in a certain area (bottom two thirds and left two thirds). How would I do this?

    Thanks for your work and updates on such a great tool!
     
  29. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    If you want to apply processing only to a specific area, you can use the submat.
    Code (CSharp):
    1.  
    2. Mat imgMat = new Mat(imgTexture.height, imgTexture.width, CvType.CV_8UC1);
    3. Mat imgSubMat = imgMat.submat(new OpenCVForUnity.CoreModule.Rect(0, 0, 400, 300));
    4.  
     
  30. Karagorion

    Karagorion

    Joined:
    Sep 1, 2022
    Posts:
    1
    Dear All,

    I wanted kindly to ask for help in a probably simple situation.
    I have a live lidarscan import and want to track the blobpoints.
    Its the RPLidar Wrapper from this Link:
    https://github.com/zcyemi/Rplidar-Unity

    What I have now is a RenderTexture from a camera that contains shows the live moving points.
    In the SimpleBlobTrackExample there is only a Texture2D input and I am very unexperienced to decide, if I am choosing the right Example to develope from and if this is the right example what would be the best way to import my RenderTexture to Texture2D.

    I want to try to code it as efficient as possible and really do a simple blobtrack (with custom settings in "how many points form a blob" or "how far away they could be until seen as two blobs" etc.)

    Am I right in using this plugin I bought in hope to develope this further or should I choose a different approach?

    Thank you very much for any help :)
     
  31. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    Unfortunately, I am not familiar with SimpleBlobTracking.
    The following example is a good reference on how to convert from RenderTexture to Mat.
    https://github.com/EnoxSoftware/Ope...CaptureExample/ImwriteScreenCaptureExample.cs
    https://github.com/EnoxSoftware/Ope...eoio/VideoWriterExample/VideoWriterExample.cs
    https://github.com/EnoxSoftware/Ope...WriterAsyncExample/VideoWriterAsyncExample.cs
     
  32. MANND

    MANND

    Joined:
    Jul 26, 2020
    Posts:
    2
    Hello EnoxSoftware,

    I am trying to build a simple ArUco tracker app for the Pico 4 headset, but I am running into some issues with the camera calibration. The current version I am building only supports windows for now, and is run within the Unity Editor with a Logitech camera plucked in to my computer. I am trying to create a script which calibrates the camera using a chessboard that is 9 x 6, but I'm running into some problems with the object points for the chessboard. When running the script with a single image (I load the images from the resource folder), it works fine, but when I introduce multiple images of the chessboard and try to calibrate the camera, I get an error which states:

    "
    CvException: CvType.CV_32SC2 != m.type() || m.cols()!=1
    Mat [ -1*-1*CV_8UC1, isCont=False, isSubmat=False, nativeObj=0x1878363727248, dataAddr=0x0 ]
    OpenCVForUnity.UtilsModule.Converters.Mat_to_vector_Mat (OpenCVForUnity.CoreModule.Mat m, System.Collections.Generic.List`1[T] mats) (at <77eb57f92a3c44f2980005bd33b70669>:0)
    OpenCVForUnity.Calib3dModule.Calib3d.calibrateCamera (System.Collections.Generic.List`1[T] objectPoints, System.Collections.Generic.List`1[T] imagePoints, OpenCVForUnity.CoreModule.Size imageSize, OpenCVForUnity.CoreModule.Mat cameraMatrix, OpenCVForUnity.CoreModule.Mat distCoeffs, System.Collections.Generic.List`1[T] rvecs, System.Collections.Generic.List`1[T] tvecs) (at <77eb57f92a3c44f2980005bd33b70669>:0)
    MarkerBasedARExample.WebCamTextureMarkerBasedARExample.Calibrate_Camera () (at Assets/MarkerBasedARExample/WebCamTextureMarkerBasedARExample/WebCamTextureMarkerBasedARExample.cs:149)
    MarkerBasedARExample.WebCamTextureMarkerBasedARExample.Start () (at Assets/MarkerBasedARExample/WebCamTextureMarkerBasedARExample/WebCamTextureMarkerBasedARExample.cs:84)
    "

    It seems to only be an error when I try to add more than one "objectPointsMat" to the "objectPoints" list. I think it is because it expects only one element within the objectPoints since it needs to be the same as size "imagePoints" (I'm guessing at least). I've tried to change the "CvType" to several different values that it seems the function expects, but without any luck. I was hoping you could show me how to get it working, or at least how I can get around this problem and calibrate my camera using a chessboard with several images instead of just a single one.

    Best regards,
    MANND
     

    Attached Files:

  33. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    Hi, MANND

    OpenCVForUnity ships with an "ArUcoCameraCalibrationExample" as an example of calibration using ArUco, have you tried that? You can load and test multiple images by enabling the Image Input Option.
    https://github.com/EnoxSoftware/Ope...ArUcoExample/ArUcoCameraCalibrationExample.cs
     
  34. MANND

    MANND

    Joined:
    Jul 26, 2020
    Posts:
    2
    Hi EnoxSoftware,

    I thought the camera calibration example only supported ArUco marker boards, but after further inspection, I can see that it also supports chessboard, which is fantastic! I'll give it a try and get back you to you with the results.

    Sorry for the late reply, and thank you so much for the help.

    Best regards,
    MANND
     
  35. tv-gc

    tv-gc

    Joined:
    Sep 16, 2021
    Posts:
    9
    Hi!

    I would like to ask if this plugin is compatible with the "rapid" module of opencv to make use of silhouette detection?
    If not, what would be the best alternative to achieve a 3D alignment by processing the camera frame and obtaining enough info to place a 3D model aligned with the real world object?

    Best regards!
     
    elvis-satta likes this.
  36. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    OpenCVForUnity does not currently support the "rapid" module.
    https://enoxsoftware.com/opencvforunity/documentation/support-modules/
     
  37. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    Hi Enox,

    I just downloaded the latest version of OCF and testing mediaPipe examples. I'm on a Mac, unity 2022.3.7f1.
    Most examples of webcam is not working - (the webcam is not showing up in Unity and Getting this error in the editor):

    OnWebCamTextureToMatHelperErrorOccurred TIMEOUT
    UnityEngine.Debug:Log (object)
    OpenCVForUnityExample.PoseEstimationMediaPipeExample:OnWebCamTextureToMatHelperErrorOccurred (OpenCVForUnity.UnityUtils.Helper.WebCamTextureToMatHelper/ErrorCode) (at Assets/OpenCVForUnity/Examples/MainModules/dnn/PoseEstimationMediaPipeExample/PoseEstimationMediaPipeExample.cs:309)
    UnityEngine.Events.UnityEvent`1<OpenCVForUnity.UnityUtils.Helper.WebCamTextureToMatHelper/ErrorCode>:Invoke (OpenCVForUnity.UnityUtils.Helper.WebCamTextureToMatHelper/ErrorCode)
    OpenCVForUnity.UnityUtils.Helper.WebCamTextureToMatHelper/<_Initialize>d__68:MoveNext () (at Assets/OpenCVForUnity/org/opencv/unity/helper/WebCamTextureToMatHelper.cs:760)
    UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/Coroutines.cs:17)
     
  38. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    Dear Enox,

    My project is for Mobile and WebGL and I just noticed in your documentation, in WebGL, videos is quite lacking.

    *1 VideoCapture (int index) and open (int index) is not supported.

    More and more unity games and apps are being published to WebGL and this is a big blocker not be able to use Video in Webgl.

    Can I make a request for this feature to be added.

    Cheers
     
  39. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    I tried it in my environment and it worked fine.
    MacbookAir 2020 M1
    Unity 2022.3.7f1
    OpenCVForUnity 2.5.6

    Is the simple WebCamTexture sample code working?
    https://docs.unity.cn/ScriptReference/WebCamTexture.Play.html
     
  40. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    I'm on Macbook pro 2019, Intel.
    Basic webcam examples work. But not other examples that are down the example list.
     
  41. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    On the WebGL platform, OpenCVForUnity does not support the VideoCapture class API for retrieving webcamera image, but does support the API for loading video files. If you want to get webcamera image in OpenCVForUnity, you can get it from WebCamTexture.
    WebGL Demo
    https://enoxsoftware.github.io/OpenCVForUnity/webgl_example/index.html
     
  42. AppliedEngineering

    AppliedEngineering

    Joined:
    Feb 1, 2016
    Posts:
    8
    Hi Enox,

    we are having issues on iOS cloud builds with unity's opencv framework.
    we are using the latest version of the package available on the package manager and the error during xcode build in the unity cloud console is the following:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: ▸ Linking UnityFramework

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [error] [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: ❌ Undefined symbols for architecture arm64

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: > Symbol: _OpenCVForUnity_UnityPluginLoad

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: > Referenced from: -[OpenCVForUnityAppController shouldAttachRenderDelegate] in OpenCVForUnityAppController.o

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [error] [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: ❌ ld: symbol(s) not found for architecture arm64

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [error] [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: ** ARCHIVE FAILED **

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: The following build commands failed:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwppdcecfipilydfudolseihhift/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/UnityFramework.framework/UnityFramework normal (in target 'UnityFramework' from project 'Unity-iPhone')

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: (1 failure)

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: Exit status: 65

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: Maybe the error shown is caused by using the wrong version of Xcode

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: Found multiple versions of Xcode in '/APPLICATION_PATH/'

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: Make sure you selected the right version for your project

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: This build process was executed using '/APPLICATION_PATH/Xcode13_4_0.app'

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: If you want to update your Xcode path, either

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.758Z] - 7.3.24.2.7.4 - INFO: - Specify the Xcode version in your Fastfile

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: - Specify an absolute path to your Xcode installation in your Fastfile

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: ▸ xcode_select "/APPLICATION_PATH/Xcode8.app"

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: - Manually update the path using

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: ▸ sudo xcode-select -s /APPLICATION_PATH/Xcode.app

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: +-------------+-------------------------------+

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: | Build environment |

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: +-------------+-------------------------------+

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: | xcode_path | /APPLICATION_PATH/Xcode13_4_0.app |

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: | gym_version | 2.212.1 |

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: | sdk | iPhoneOS15.5.sdk |

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO: +-------------+-------------------------------+

    [2023-10-20T14:14:43.759Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.761Z] - 7.3.24.2.7.4 - INFO: ▸ -[OpenCVForUnityAppController shouldAttachRenderDelegate] in OpenCVForUnityAppController.o

    [2023-10-20T14:14:43.761Z] - 7.3.24.2.7.4 - INFO: ▸ ld: symbol(s) not found for architecture arm64

    [error] [2023-10-20T14:14:43.761Z] - 7.3.24.2.7.4 - INFO: ▸ clang: error: linker command failed with exit code 1 (use -v to see invocation)

    [warning] [2023-10-20T14:14:43.761Z] - 7.3.24.2.7.4 - INFO: ▸ /BUILD_PATH/lucamenci.mocapengine.eflycast/temp20231020-2282-pd8cmt/Unity-iPhone.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 16.2, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'Unity-iPhone' from project 'Unity-iPhone')

    [2023-10-20T14:14:43.761Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.761Z] - 7.3.24.2.7.4 - INFO: ⬆️ Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error

    [2023-10-20T14:14:43.761Z] - 7.3.24.2.7.4 - INFO: For the complete and more detailed error log, check the full log at:

    [2023-10-20T14:14:43.761Z] - 7.3.24.2.7.4 - INFO: /BUILD_PATH/Library/Logs/gym/eFlyCast-Unity-iPhone.log

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO: Looks like fastlane ran into a build/archive error with your project

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO: It's hard to tell what's causing the error, so we wrote some guides on how

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO: Before submitting an issue on GitHub, please follow the guide above and make

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO: sure your project is set up correctly.

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO: fastlane uses `xcodebuild` commands to generate your binary, you can see the

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO: the full commands printed out in yellow in the above log.

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO: Make sure to inspect the output above, as usually you'll find more error information there

    [2023-10-20T14:14:43.762Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.763Z] - 7.3.24.2.7.4 - INFO: +------------------+-----------+

    [2023-10-20T14:14:43.763Z] - 7.3.24.2.7.4 - INFO: | Lane Context |

    [2023-10-20T14:14:43.763Z] - 7.3.24.2.7.4 - INFO: +------------------+-----------+

    [2023-10-20T14:14:43.763Z] - 7.3.24.2.7.4 - INFO: | DEFAULT_PLATFORM | ios |

    [2023-10-20T14:14:43.763Z] - 7.3.24.2.7.4 - INFO: | PLATFORM_NAME | ios |

    [2023-10-20T14:14:43.763Z] - 7.3.24.2.7.4 - INFO: | LANE_NAME | ios build |

    [2023-10-20T14:14:43.763Z] - 7.3.24.2.7.4 - INFO: +------------------+-----------+

    [2023-10-20T14:14:43.763Z] - 7.3.24.2.7.4 - INFO: Error building the application - see the log above

    [2023-10-20T14:14:43.868Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: +------+---------------------------------------------------------------+-------------+

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: | fastlane summary |

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: +------+---------------------------------------------------------------+-------------+

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: | Step | Action | Time (in s) |

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: +------+---------------------------------------------------------------+-------------+

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: | 1 | Verifying fastlane version | 0 |

    [!] Error building the application - see the log above
    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: | 2 | default_platform | 0 |

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: | 3 | set_info_plist_value | 0 |

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: | 4 | update_project_provisioning | 0 |

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: | 5 | sed -i '' '/PROVISIONING_PROFILE_SPECIFIER/d;/DEVELOPMENT_TEA | 0 |

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: | | gym | 250 |

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: +------+---------------------------------------------------------------+-------------+

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO:

    [2023-10-20T14:14:43.870Z] - 7.3.24.2.7.4 - INFO: fastlane finished with errors

    [error] [2023-10-20T14:14:43.882Z] - 7.3.24.2.7.4 - ERROR: xcode build failed
    [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "CI".
    [warning] [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - WARN: Attempted to override a protected variable. The environment variable "CI" cannot be overridden.
    [warning] [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "SKIP_SLOW_FASTLANE_WARNING".
    [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "FASTLANE_DISABLE_ANIMATION".
    [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "FASTLANE_DISABLE_COLORS".
    [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "FASTLANE_SKIP_UPDATE_CHECK".
    [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "FASTLANE_SKIP_DOCS".
    [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "FASTLANE_OPT_OUT_USAGE".
    [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "FASTLANE_HIDE_GITHUB_ISSUES".
    [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "FASTLANE_HIDE_TIMESTAMP".
    [2023-10-20T14:14:43.887Z] - 7.3.24.2.7.4 - INFO: Setting the environment variable "BUILD_RESULT
     
  43. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    I have tried it on my MacbookPro2015, Intel and it works fine.
    Perhaps changing the Timeout frame count to a larger value might work.


    timeoutcount.png
     
  44. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    Perhaps the build error is due to a previous version of the file remaining in the project. Could you delete the "Assets/OpenCVForUnity" folder and then re-import the unitypackage?
     
  45. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    Yes your right, increasing this number made it work. Awesome.

    Btw, the Posedetection with mediaPipe works but very low FPS. 18 fps on my mac in the editor and in the webgl example link, it's only 3fps. These numbers effectively means that mediapipe pose detection is not useable in a real project.
    Is there a way to increase the FPS to 30 ? Normally mediapipe pose detection is quite fast outside of unity.
     
  46. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    The OpenCVForUnity dnn module Example is a port of the Example from the model_zoo repository.
    https://github.com/opencv/opencv_zoo
    I cloned the model_zoo repository and ran demo.py and compared it to the fps when run in OpenCVForUnity, and it was about the same fps.
     
  47. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    Can you suggest some options on how the FPS can be improved?
     
  48. EnoxSoftware

    EnoxSoftware

    Joined:
    Oct 29, 2014
    Posts:
    1,538
    First of all, frame skip is an effective way to improve FPS.
    You can easily try frame skipping with the ImageOptimizationHelper component. Please try the attached file.
     

    Attached Files:

    EmeralLotus likes this.
  49. CaptainPyFace

    CaptainPyFace

    Joined:
    Apr 12, 2013
    Posts:
    9
    Hi Enox, thank you very much for the great work you're doing!
    I am facing a rather tough issue and I hope you can help me with this. I have the OpenCV and DlibFaceLandmarkDetector assets as well as the FaceMaskExample asset in my Unity 2022.2.0f1 project. I am trying to get the Texture2DFaceMaskExample scene to work in a WebGL build with a public URL containing an mp4 video file instead of the dance_mjpeg file contained in the StreamingAssets folder. This is not a CORS issue as the mp4 video url does play when using Unity’s VideoPlayer component in both editor and WebGL build. However, when I change the VideoCaptureToMatHelper.cs script line 395 to fullPath = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"; the mp4 video plays in the editor with the facemask filter but not in the WebGL build which says ErrorCode: VIDEO_FILE_CANT_OPEN. Can you please help me so I can use the Texture2DFaceMaskExample scene with video's from URL's? Thank you
     
    Last edited: Oct 23, 2023
  50. AppliedEngineering

    AppliedEngineering

    Joined:
    Feb 1, 2016
    Posts:
    8
    then it give me this error
    [error] [2023-10-23T09:05:47.168Z] - 7.3.24.2.7.4 - INFO: ❌ ld: framework not found opencv2