Search Unity

NatDevice - Media Device API

Discussion in 'Assets and Asset Store' started by Lanre, Dec 17, 2015.

?

Should we add exposure controls in v1.3? This means dropping support for iOS 7

Poll closed Jun 10, 2016.
  1. Yes

    9 vote(s)
    75.0%
  2. No

    3 vote(s)
    25.0%
  1. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    I just need to see the full logs from logcat. I suspect a padding issue, but I can't be sure without the logs.
     
  2. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Also, can you Debug.Log(NatCam.Preview.width+", "+NatCam.Preview.height)?
     
  3. gbyh

    gbyh

    Joined:
    Apr 19, 2014
    Posts:
    5
    Now I updated the version to 2.1f1 and I just use the GreyCam example for sample but I just faced 2 issues :
    1. switch camera to the front always failed(a black screen without any error)
      Code (CSharp):
      1. if (NatCam.Camera.IsFrontFacing)
      2.                 NatCam.StartPreview(DeviceCamera.RearCamera, OnStart, OnFrame);
      3.             else
      4.                 NatCam.StartPreview(DeviceCamera.FrontCamera, OnStart, OnFrame);
    2. switch camera is very slow and always crash. The preview resolution is 640*480
     
  4. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    What device are you testing on? Can you upload the full logs in a .txt file?
     
  5. jpenery

    jpenery

    Joined:
    Jul 13, 2018
    Posts:
    5
    https://pastebin.com/1A4EZAD9

    I pasted logcat output from a few tries on the Nexus6P. I tried to remove all the useless junk.
    Hope it helps, thanks!

    Preview resolution logs as 1280x720, which the logcat output seems to agree with.
     
    Last edited: Nov 20, 2018
    Lanre likes this.
  6. moyado

    moyado

    Joined:
    Jan 2, 2013
    Posts:
    7
    will we have a black friday sale for natcam? I am very curious about this asset. If there is any discount in this season, I'll buy it.
     
  7. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Unfortunately Unity is not providing a Black Friday discount for NatCam this year.
     
  8. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Can you shoot me an email? The problem isn't because of padding. I need to find out what exactly the issue is so I'll be sharing builds of the Android library with you for testing.
     
  9. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    Hi,
    Thanks for the fantastic plugin!
    I have a question about android. I'm not using the webcam or WebCamTexture features of Natcorder. Although, on Android it asks to access the camera when opening the app, how can I disable this request?
    Thanks again!!
    Eric
     
  10. fafase

    fafase

    Joined:
    Jul 3, 2012
    Posts:
    163
    Check the manifest to remove the Camera permission. But you won't be able to use any Camera related feature then.
     
    Lanre likes this.
  11. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Also, make sure that the NatCorder example scenes are not included in the build.
     
  12. Jefftrials

    Jefftrials

    Joined:
    Dec 27, 2016
    Posts:
    3
    Hi, we (Eric and I) would like to remove the permission prebuild. When you say manifest you are talking about the post build manifest correct? I don’t see a plugin manifest. I am assuming unity creates the permissions from the API used in the plugin? And there is no option to turn it off?
     
  13. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    That's right. To do it pre-build, you need to make sure that no scenes in the build rely on the camera (so that when Unity performs stripping, there is no code referencing the WebCamTexture class).
     
  14. Jefftrials

    Jefftrials

    Joined:
    Dec 27, 2016
    Posts:
    3
    Ok removing the examples folder did the trick. Thanks everyone!
     
    Lanre likes this.
  15. moyado

    moyado

    Joined:
    Jan 2, 2013
    Posts:
    7
    Hello, I bought the natcam plugin to use it with opencv

    I'm testing this example :
    https://github.com/EnoxSoftware/NatCamWithOpenCVForUnityExample

    but it gives me an error with this line:
    Code (csharp):
    1. public CameraResolution previewResolution = CameraResolution._1280x720;
    Assets/NatCamWithOpenCV/Assets/NatCamWithOpenCVForUnityExample/NatCamPreviewOnlyExample/NatCamPreviewOnlyExample.cs(32,16): error CS0246: The type or namespace name `CameraResolution' could not be found. Are you missing an assembly reference?

    Assets/NatCamWithOpenCV/Assets/NatCamWithOpenCVForUnityExample/NatCamPreviewToMatExample/NatCamPreviewToMatExample.cs(48,16): error CS0246: The type or namespace name `CameraResolution' could not be found. Are you missing an assembly reference?


    maybe this line must be diferent with the new version of natcam ?
     
  16. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Ah I have to update the OpenCV example; sorry about that. We removed `CameraResolution`. Use Unity's built-in `Vector2Int` type instead.
     
  17. moyado

    moyado

    Joined:
    Jan 2, 2013
    Posts:
    7
    I will wait for the updated sample because I'm getting some errors when I change that line.
    Thanks!
     
  18. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    I'm working on it right now. You can keep track here.
     
    moyado likes this.
  19. kanpanstar

    kanpanstar

    Joined:
    Sep 16, 2018
    Posts:
    3
    CurrentVersion 2.1f1 is now critical issues in Android.
    NatCam.aar used AndroidManifest.xml in <uses-feature android:name="android.hardware.camera2.full" />
    is not supported android feature.
    so apk file containing that's aar, devices supported is 0 in the play store.
     
  20. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    A workaround is to export a Gradle project and modify the Android manifest from there. I'm submitting the fix to the Asset Store tomorrow.
     
  21. Deleted User

    Deleted User

    Guest

    Hi,
    First of all thanks for making this great plugin! Im facing the same issues as jpenery. Green bar in the top and weird colors. Im running NatCam on a Huawei Mediapad T3. I tried running your APK from the NatCamWithOpenCVForUnityExample git, and everything is working fine. Hence I suspect the issue is with the new update to NatCam. Is there any chance that I can get a hold of the old release of NatCam that the APK is running or do I have to wait until you've fixed it in the new update? And if so, when can I expect a fix?

    Thanks!
    - Carl
     
  22. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Hi Carl. We've submitted the update with the fix. We're waiting for Unity to approve it.
     
  23. Deleted User

    Deleted User

    Guest

    Thanks for the quick reply! Im looking forward to the update.
     
    Lanre likes this.
  24. jose_pedro_didimo

    jose_pedro_didimo

    Joined:
    May 2, 2018
    Posts:
    15
    Hi, I’ve purchased the NatCam plugin but it is crashing/hanging the app on mobile after the capture button is pressed. The image freezes and no error is displayed on the log.
    It works fine on the editor using the webcam.
    Could I be doing something wrong?

    Using:
    sony xperia xz1, Android 8.0.0,
    Unity 2018.1.8f1
    minimum API level 24
    NatCam ver. 2.1f2
     
  25. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    46
    I'm having this same issue when uploading to the google play store. Thanks for submitting the fix.
     
  26. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Can you upload the full logs in a .txt file? It might be that you need to reduce the photo resolution because it might be too much for the device to process before sending to Unity.
     
  27. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    The 2.1f2 update fixes this issue. The update is now available on the Asset Store.
     
    cam415 likes this.
  28. TobiasW

    TobiasW

    Joined:
    Jun 18, 2011
    Posts:
    91
    Hello Lanre,

    when taking a photo on Android, I get these two entries in my LogCat, presumably in the first two lines of NatCamAndroid.
    onPhoto:
    Bitmap : Called getWidth() on a recycle()'d bitmap! This is undefined behavior!
    Bitmap : Called getHeight() on a recycle()'d bitmap! This is undefined behavior!

    Is that expected?

    (My NatCam version is still 2.0f1 because of the crashes on my Xperia Z3 Compact with higher versions. Maybe you remember; we had a whole email thread around it.)

    Also, while I'm here: What do you think is the most performant way to crop a picture I've taken with NatCam to a quadratic texture?

    And how does NatCam choose it's camera resolution if I give it certain values and it can't match that? Is there any way for me to say "Use the lowest possible height that bigger or equal to 1440"?

    Cheers,
    Tobias
     
    Last edited: Dec 5, 2018
  29. Deleted User

    Deleted User

    Guest

    Hi Lanre,
    Initially your update seemed to work but I found some issues - im running my app on a Huawei Mediapad T3 with Android 7.0. First of all changing the resolution does not seem to have any impact. The picture drawn to my screen looks the same regardless of what resolution I pick - I use the greycam example. Im printing the resolution set by the Natcam.preview and I can see that it changes depending on wether im running 640x480 or 1280x720, however the picture looks the same.
    Second of all my app is crashing on the Huawei but not when running in the editor. Skimming the logcat, this line seems to break the thing: "02-11 23:59:32.542 14920-15216/? E/art: JNI ERROR (app bug): accessed deleted global reference 0x100b3e". When the app crashes seems random, however I noticed that when im running image processing on the camera stream it seems to appear faster.

    I hope you can help.
    - Carl
     
  30. DennyOctagon

    DennyOctagon

    Joined:
    Jul 12, 2018
    Posts:
    8
    hi, I experienced issue when uploading to google play store too. after I update Natcam to 2.1f2, the google play store issue solved. but I've got another error and can't build the app for iOS:

    Screen Shot 2018-12-05 at 17.14.16.png

    i use natcam and natcorder at the same project.
     
    Last edited: Dec 5, 2018
  31. jose_pedro_didimo

    jose_pedro_didimo

    Joined:
    May 2, 2018
    Posts:
    15
    I tried changing the resolution but it did not help. Log summary below:


    12-05 12:10:02.639 18355 18391 D Unity : NatCam: Changed camera 0 preview resolution to 1280x720
    12-05 12:10:02.639 18355 18391 D Unity : NatCam: Changed camera 0 photo resolution to 3264x2448
    12-05 12:10:02.640 18355 18391 D Unity : NatCam: Changed camera 0 framerate to 30
    12-05 12:10:02.641 18355 18391 D Unity : NatCam: Changed camera 1 preview resolution to 1280x720
    12-05 12:10:02.641 18355 18391 D Unity : NatCam: Changed camera 1 photo resolution to 2592x1944
    12-05 12:10:02.641 18355 18391 D Unity : NatCam: Changed camera 1 framerate to 30

    12-05 12:10:02.679 18355 18688 V Unity : NatRender: Created ES3 GLRenderContext
    12-05 12:10:03.465 18355 18391 D Unity : NatCam: Camera 1 started preview
    12-05 12:10:03.675 18355 18391 I Unity : DEBUG NATCAM - OnStart
    12-05 12:10:03.680 18355 18391 D Unity : NatCam: Changed camera 1 preview resolution to 1280x720
    12-05 12:10:03.680 18355 18391 I Unity : DEBUG NATCAM - PreviewResolution set
    12-05 12:10:03.680 18355 18391 D Unity : NatCam: Changed camera 1 photo resolution to 1280x720
    12-05 12:10:03.680 18355 18391 I Unity : DEBUG NATCAM - PhotoResolution set

    12-05 12:10:07.579 18355 18391 E Unity : NatCam Error: Active camera encountered error:4


    Longer version:
    Code (CSharp):
    1. 12-05 12:15:29.009 19635 19669 I Unity   : DEBUG NATCAM - StartCamera
    2. 12-05 12:15:29.077 19635 19669 I Unity   : NatCam: Initialized NatCam 2.1 Android backend
    3. 12-05 12:15:29.082 19635 19669 D Unity   : NatCam: Changed camera 0 preview resolution to 1280x720
    4. 12-05 12:15:29.082 19635 19669 D Unity   : NatCam: Changed camera 0 photo resolution to 3264x2448
    5. 12-05 12:15:29.082 19635 19669 D Unity   : NatCam: Changed camera 0 framerate to 30
    6. 12-05 12:15:29.083 19635 19669 D Unity   : NatCam: Changed camera 1 preview resolution to 1280x720
    7. 12-05 12:15:29.083 19635 19669 D Unity   : NatCam: Changed camera 1 photo resolution to 2592x1944
    8. 12-05 12:15:29.083 19635 19669 D Unity   : NatCam: Changed camera 1 framerate to 30
    9. 12-05 12:15:29.096  1171 11770 E ActivityManager: Sending non-protected broadcast com.sonymobile.intent.action.POWER_BACK_OFF_FACTOR_CHANGED from system 3197:com.android.phone/1001 pkg com.android.phone
    10. 12-05 12:15:29.096  1171 11770 E ActivityManager: java.lang.Throwable
    11. 12-05 12:15:29.096  1171 11770 E ActivityManager:       at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:21800)
    12. 12-05 12:15:29.096  1171 11770 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:22316)
    13. 12-05 12:15:29.096  1171 11770 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:22551)
    14. 12-05 12:15:29.096  1171 11770 E ActivityManager:       at android.app.IActivityManager$Stub.onTransact$broadcastIntent$(IActivityManager.java:10171)
    15. 12-05 12:15:29.096  1171 11770 E ActivityManager:       at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:167)
    16. 12-05 12:15:29.096  1171 11770 E ActivityManager:       at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3416)
    17. 12-05 12:15:29.096  1171 11770 E ActivityManager:       at android.os.Binder.execTransact(Binder.java:731)
    18. 12-05 12:15:29.098  1171 11770 D ActivityManager: New dropbox entry: system_server, system_server_wtf, 6c048c53-53cb-4f76-923c-88ca57f4ef4e
    19. 12-05 12:15:29.104  1171 11770 E ActivityManager: Sending non-protected broadcast com.sonymobile.intent.action.POWER_BACK_OFF_FACTOR_CHANGED from system 3197:com.android.phone/1001 pkg com.android.phone
    20. 12-05 12:15:29.104  1171 11770 E ActivityManager: java.lang.Throwable
    21. 12-05 12:15:29.104  1171 11770 E ActivityManager:       at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:21800)
    22. 12-05 12:15:29.104  1171 11770 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:22409)
    23. 12-05 12:15:29.104  1171 11770 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:22551)
    24. 12-05 12:15:29.104  1171 11770 E ActivityManager:       at android.app.IActivityManager$Stub.onTransact$broadcastIntent$(IActivityManager.java:10171)
    25. 12-05 12:15:29.104  1171 11770 E ActivityManager:       at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:167)
    26. 12-05 12:15:29.104  1171 11770 E ActivityManager:       at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3416)
    27. 12-05 12:15:29.104  1171 11770 E ActivityManager:       at android.os.Binder.execTransact(Binder.java:731)
    28. 12-05 12:15:29.105  1171 11770 D ActivityManager: New dropbox entry: system_server, system_server_wtf, 89f67d79-e7da-4bef-80a3-92fd33a46fd8
    29. 12-05 12:15:29.108 19635 19754 V Unity   : NatRender: Created ES3 GLRenderContext
    30. 12-05 12:15:29.787   974 19750 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:185 ~DeferredRequestQueue() Freeing a node that shouldnt be available!
    31. 12-05 12:15:29.787   974 19750 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:185 ~DeferredRequestQueue() Freeing a node that shouldnt be available!
    32. 12-05 12:15:29.830   974 19750 E CamX    : [ERROR][ISP    ] camxifelsc34.cpp:193 TranslateCalibrationTableToCommonLibrary() Invalid index for EEPROM data
    33. 12-05 12:15:29.830   974 19750 E CamX    : [ERROR][ISP    ] camxifelsc34.cpp:193 TranslateCalibrationTableToCommonLibrary() Invalid index for EEPROM data
    34. 12-05 12:15:29.871   974 19750 E CamX    : [ERROR][HAL    ] camxchicontext.cpp:3562 ActivatePipeline() isSessionRealtime 1
    35. 12-05 12:15:29.871   974 19750 E CamX    : [ERROR][HAL    ] camxchicontext.cpp:3565 ActivatePipeline() Activating real time session
    36. 12-05 12:15:29.874   974 19750 E CamX    : [ERROR][CORE   ] camxpipeline.cpp:316 StreamOn() StreamingOn for pipeline: 0xcde08000 isSessionRealtime 1
    37. 12-05 12:15:29.883 19635 19669 D Unity   : NatCam: Camera 1 started preview
    38. 12-05 12:15:30.080 19635 19669 I Unity   : DEBUG NATCAM - OnStart
    39. 12-05 12:15:30.085 19635 19669 D Unity   : NatCam: Changed camera 1 preview resolution to 1280x720
    40. 12-05 12:15:30.085 19635 19669 I Unity   : DEBUG NATCAM - PreviewResolution set
    41. 12-05 12:15:30.086 19635 19669 D Unity   : NatCam: Changed camera 1 photo resolution to 1280x720
    42. 12-05 12:15:30.086 19635 19669 I Unity   : DEBUG NATCAM - PhotoResolution set
    43. 12-05 12:15:31.178  1171  1195 I ActivityManager: Start proc 19783:com.sonymobile.wifi:idd/1000 for service com.sonymobile.wifi/.idd.IddService
    44. 12-05 12:15:32.563   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 19 signaled with failure 1 in node fence handler
    45. 12-05 12:15:32.563   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 47 signaled with failure 1 in node fence handler
    46. 12-05 12:15:32.563   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 1 signaled with failure 1 in node fence handler
    47. 12-05 12:15:32.563   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 48 signaled with failure 1 in node fence handler
    48. 12-05 12:15:32.563   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IFE  requestId: 81
    49. 12-05 12:15:32.563   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: 30000022 , fence: 00000000(00000000), request: 81...result willbe an error
    50. 12-05 12:15:32.563   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: 30000023 , fence: 00000000(00000000), request: 81...result willbe an error
    51. 12-05 12:15:32.563   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: 800f0006 , fence: 00000000(00000000), request: 81...result willbe an error
    52. 12-05 12:15:32.563   974  1127 E CamX    : [ERROR][UTILS  ] camxthreadcore.cpp:79 AcceptNewJob() Job cannot be accepted at this time
    53. 12-05 12:15:32.563   974  1127 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:1049 DispatchReadyNodes() Failed to post ProcessRequest job for node IPE:0, request 81
    54. 12-05 12:15:32.563   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: a93e28d0(00000013), request: 81...result willbe an error
    55. 12-05 12:15:32.563   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 49 signaled with failure 1 in node fence handler
    56. 12-05 12:15:32.563   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 4 sequenceId : 80
    57. 12-05 12:15:32.563   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 55 signaled with failure 1 in node fence handler
    58. 12-05 12:15:32.563   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 5 sequenceId : 80
    59. 12-05 12:15:32.563   974  1126 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=80 in error state.
    60. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65541 [LRME] InstanceID:0 Fence 75 signaled with failure 1 in node fence handler
    61. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 56 signaled with failure 1 in node fence handler
    62. 12-05 12:15:32.564   974  1126 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=80 in error state.
    63. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 76 signaled with failure 1 in node fence handler
    64. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 10 signaled with failure 1 in node fence handler
    65. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 11 signaled with failure 1 in node fence handler
    66. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 12 signaled with failure 1 in node fence handler
    67. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 77 signaled with failure 1 in node fence handler
    68. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 81 signaled with failure 1 in node fence handler
    69. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 26 signaled with failure 1 in node fence handler
    70. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 21 signaled with failure 1 in node fence handler
    71. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 23 signaled with failure 1 in node fence handler
    72. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 24 signaled with failure 1 in node fence handler
    73. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65541 [LRME] InstanceID:0 Fence 89 signaled with failure 1 in node fence handler
    74. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 59 signaled with failure 1 in node fence handler
    75. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65536 [IFE] InstanceID:0 Fence 66 signaled with failure 1 in node fence handler
    76. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65541 [LRME] InstanceID:0 Fence 88 signaled with failure 1 in node fence handler
    77. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 6 sequenceId : 80
    78. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 7 sequenceId : 80
    79. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IFE  requestId: 81
    80. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: e6a7e0d0(00000037), request: 81...result willbe an error
    81. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: LRME  requestId: 81
    82. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: d7ded0d0(0000004b), request: 81...result willbe an error
    83. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][UTILS  ] camxthreadcore.cpp:79 AcceptNewJob() Job cannot be accepted at this time
    84. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:1049 DispatchReadyNodes() Failed to post ProcessRequest job for node RANSAC:0, request 81
    85. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IFE  requestId: 81
    86. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: e3b7c0d0(00000038), request: 81...result willbe an error
    87. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IFE  requestId: 82
    88. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: 30000022 , fence: 00000000(00000000), request: 82...result willbe an error
    89. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: 30000023 , fence: 00000000(00000000), request: 82...result willbe an error
    90. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: 800f0006 , fence: 00000000(00000000), request: 82...result willbe an error
    91. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][UTILS  ] camxthreadcore.cpp:79 AcceptNewJob() Job cannot be accepted at this time
    92. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:1049 DispatchReadyNodes() Failed to post ProcessRequest job for node IPE:0, request 82
    93. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: a93e2988(0000004c), request: 82...result willbe an error
    94. 12-05 12:15:32.564   974  1126 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=80 in error state.
    95. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65538 [IPE] InstanceID:0 Fence 61 signaled with failure 1 in node fence handler
    96. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65538 [IPE] InstanceID:0 Fence 71 signaled with failure 1 in node fence handler
    97. 12-05 12:15:32.564   974  1126 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=80 in error state.
    98. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 4 sequenceId : 81
    99. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 6 sequenceId : 81
    100. 12-05 12:15:32.564   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 7 sequenceId : 81
    101. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65538 [IPE] InstanceID:0 Fence 72 signaled with failure 1 in node fence handler
    102. 12-05 12:15:32.564   974  1132 E CamX    : [ERROR][CORE   ] camxnode.cpp:2703 CSLFenceCallback() Node:65538 [IPE] InstanceID:0 Fence 73 signaled with failure 1 in node fence handler
    103. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IFE  requestId: 82
    104. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: e6a7e188(0000004d), request: 82...result willbe an error
    105. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IFE  requestId: 82
    106. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: e3b7c188(00000051), request: 82...result willbe an error
    107. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IFE  requestId: 83
    108. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: 30000022 , fence: 00000000(00000000), request: 83...result willbe an error
    109. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: 30000023 , fence: 00000000(00000000), request: 83...result willbe an error
    110. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: 800f0006 , fence: 00000000(00000000), request: 83...result willbe an error
    111. 12-05 12:15:32.565   974  1128 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=81 in error state.
    112. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][UTILS  ] camxthreadcore.cpp:79 AcceptNewJob() Job cannot be accepted at this time
    113. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:1049 DispatchReadyNodes() Failed to post ProcessRequest job for node IPE:0, request 83
    114. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: a93e2a40(0000001a), request: 83...result willbe an error
    115. 12-05 12:15:32.565   974  1128 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=81 in error state.
    116. 12-05 12:15:32.565   974  1128 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=81 in error state.
    117. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 4 sequenceId : 82
    118. 12-05 12:15:32.565   974  1129 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=82 in error state.
    119. 12-05 12:15:32.565   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 6 sequenceId : 82
    120. 12-05 12:15:32.565   974  1126 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=82 in error state.
    121. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 7 sequenceId : 82
    122. 12-05 12:15:32.566   974  1128 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=82 in error state.
    123. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: LRME  requestId: 82
    124. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: d7ded188(00000059), request: 82...result willbe an error
    125. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][UTILS  ] camxthreadcore.cpp:79 AcceptNewJob() Job cannot be accepted at this time
    126. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:1049 DispatchReadyNodes() Failed to post ProcessRequest job for node RANSAC:0, request 82
    127. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IFE  requestId: 83
    128. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: e6a7e240(0000003b), request: 83...result willbe an error
    129. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IFE  requestId: 83
    130. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: e3b7c240(00000042), request: 83...result willbe an error
    131. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: LRME  requestId: 83
    132. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: d7ded240(00000058), request: 83...result willbe an error
    133. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][UTILS  ] camxthreadcore.cpp:79 AcceptNewJob() Job cannot be accepted at this time
    134. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:1049 DispatchReadyNodes() Failed to post ProcessRequest job for node RANSAC:0, request 83
    135. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxsession.cpp:2405 InjectResult() Reporting a buffer error to the framework for streamIndex 0 sequenceId : 79
    136. 12-05 12:15:32.566   974  1129 E CamX    : [ERROR][CORE   ] camxsession.cpp:1723 ProcessResultBuffers() Result buffer for sequence ID=79 in error state.
    137. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][PPROC  ] camxipenode.cpp:6475 NotifyRequestProcessingError() Fence failure for output port 10 req 80
    138. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IPE  requestId: 80
    139. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: e35b5018(00000047), request: 80...result willbe an error
    140. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][PPROC  ] camxipenode.cpp:6475 NotifyRequestProcessingError() Fence failure for output port 11 req 80
    141. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IPE  requestId: 80
    142. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: e31fd018(00000048), request: 80...result willbe an error
    143. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][PPROC  ] camxipenode.cpp:6475 NotifyRequestProcessingError() Fence failure for output port 12 req 80
    144. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][CORE   ] camxnode.cpp:2893 ProcessFenceCallback() Fence error detected for Node: IPE  requestId: 80
    145. 12-05 12:15:32.566   974  1127 E CamX    : [ERROR][DRQ    ] camxdeferredrequestqueue.cpp:946 UpdateDependency() Failure to update: property: ffffffff , fence: d7de2018(00000049), request: 80...result willbe an error
    146. 12-05 12:15:32.582   974 19750 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:185 ~DeferredRequestQueue() Freeing a node that shouldnt be available!
    147. 12-05 12:15:32.582   974 19750 E CamX    : [ERROR][CORE   ] camxdeferredrequestqueue.cpp:185 ~DeferredRequestQueue() Freeing a node that shouldnt be available!
    148. 12-05 12:15:32.713  1171  7192 E ActivityManager: Sending non-protected broadcast com.sonymobile.intent.action.POWER_BACK_OFF_FACTOR_CHANGED from system 3197:com.android.phone/1001 pkg com.android.phone
    149. 12-05 12:15:32.713  1171  7192 E ActivityManager: java.lang.Throwable
    150. 12-05 12:15:32.713  1171  7192 E ActivityManager:       at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:21800)
    151. 12-05 12:15:32.713  1171  7192 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:22316)
    152. 12-05 12:15:32.713  1171  7192 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:22551)
    153. 12-05 12:15:32.713  1171  7192 E ActivityManager:       at android.app.IActivityManager$Stub.onTransact$broadcastIntent$(IActivityManager.java:10171)
    154. 12-05 12:15:32.713  1171  7192 E ActivityManager:       at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:167)
    155. 12-05 12:15:32.713  1171  7192 E ActivityManager:       at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3416)
    156. 12-05 12:15:32.713  1171  7192 E ActivityManager:       at android.os.Binder.execTransact(Binder.java:731)
    157. 12-05 12:15:32.714 19635 19669 E Unity   : NatCam Error: Active camera encountered error:4
    158. 12-05 12:15:32.715  1171  7192 D ActivityManager: New dropbox entry: system_server, system_server_wtf, 8262c982-bf9a-402e-866d-4c00404d5a1b
    159. 12-05 12:15:32.721  1171  7192 E ActivityManager: Sending non-protected broadcast com.sonymobile.intent.action.POWER_BACK_OFF_FACTOR_CHANGED from system 3197:com.android.phone/1001 pkg com.android.phone
    160. 12-05 12:15:32.721  1171  7192 E ActivityManager: java.lang.Throwable
    161. 12-05 12:15:32.721  1171  7192 E ActivityManager:       at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:21800)
    162. 12-05 12:15:32.721  1171  7192 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:22409)
    163. 12-05 12:15:32.721  1171  7192 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:22551)
    164. 12-05 12:15:32.721  1171  7192 E ActivityManager:       at android.app.IActivityManager$Stub.onTransact$broadcastIntent$(IActivityManager.java:10171)
    165. 12-05 12:15:32.721  1171  7192 E ActivityManager:       at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:167)
    166. 12-05 12:15:32.721  1171  7192 E ActivityManager:       at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3416)
    167. 12-05 12:15:32.721  1171  7192 E ActivityManager:       at android.os.Binder.execTransact(Binder.java:731)
    168. 12-05 12:15:32.722  1171  7192 D ActivityManager: New dropbox entry: system_server, system_server_wtf, 87a0c847-cbfb-47a7-a20b-a5fd4a2e0011
     

    Attached Files:

    Last edited: Dec 5, 2018
  32. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Nope, this is a bug in that version. I don't recall the issue with the Z3, but have you tried NatCam 2.1? It uses the newer android.hardware.camera2 API, so pretty much everything has been overhauled on Android.
    I recommend getting the raw texture data (not Color32[]), and performing a row-by-row copy into a destination pixel buffer. Going through the GPU might seem like the faster alternative, but if you need the pixel data in system memory, then I recommend the row-copy approach. Use Buffer.BlockCopy to perform the copying as it internally does a `memmove`.
    NatCam chooses the supported resolution closest to what you pass in. It uses L1 distance to find the closest match. You don't have control over the resolution being less than or greater than.
     
  33. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    NatCam doesn't have any control over this. We receive the pixel data provided by the camera Hardware Abstraction Layer (HAL), and we forward it to OpenGL ES for preview. Apparent quality changes are entirely up to the device and camera, not NatCam.
    Can you upload the full logs in a .txt attachment?
     
  34. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Can you share a fuller screenshot? Below the area you cropped should be a list of the symbols that are missing. I need to see that. You can try deleting your built iOS project and re-building from Unity.
     
  35. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    Has anyone tried Natcam+ OpenCVForUnity? If so, do you have a before/after shot of the camera difference?
     
  36. DennyOctagon

    DennyOctagon

    Joined:
    Jul 12, 2018
    Posts:
    8
    hi lanre, i deleted the iOS project and re-building from unity. here is another screenshoot. but there's nothing below activity log complete.

    image.png

    and here is some snippet that show warning some plugins need newer iOS version.
    Code (CSharp):
    1. ld: warning: object file (/Users/***/Build/Libraries/NatCam/Plugins/iOS/libNatRender.a(RenderContext.o)) was built for newer iOS version (12.0) than being linked (9.0)
    2. ld: warning: object file (/Users/***/Build/Libraries/NatCam/Plugins/iOS/libNatRender.a(RenderDispatch.o)) was built for newer iOS version (12.0) than being linked (9.0)
    3. ld: warning: object file (/Users/***/Build/Libraries/NatCam/Plugins/iOS/libNatRender.a(TransferContext.o)) was built for newer iOS version (12.0) than being linked (9.0)
    4. ld: warning: object file (/Users/***/Build/Libraries/NatCam/Plugins/iOS/libNatRender.a(RenderTrigger.o)) was built for newer iOS version (12.0) than being linked (9.0)
     
  37. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Although the official example hasn't been updated to NatCam 2.1, you can find benchmarks on the performance difference. See here.
     
    ina likes this.
  38. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    When you got the updated NatCam version, it looks like you didn't delete the version you had. Delete NatCam from your project and reimport it from the Asset Store. Then delete the iOS build project, and rebuild from Unity.
     
  39. jose_pedro_didimo

    jose_pedro_didimo

    Joined:
    May 2, 2018
    Posts:
    15
    Hi, did you get a chance to look at the logs?
     
  40. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    What device is this? Apparently the camera device is encountering an error (outside what we can control). Also, are you setting the preview and photo resolution after calling StartPreview? You should only set them before starting the preview.
     
  41. jose_pedro_didimo

    jose_pedro_didimo

    Joined:
    May 2, 2018
    Posts:
    15
    I had tried setting the resolution before startPreview, but then I got a NullReferenceException. I was able to solve the issue by changing the resolution on the device camera object that is passed to startPreview. Thanks for your help!
     
  42. TobiasW

    TobiasW

    Joined:
    Jun 18, 2011
    Posts:
    91
    The T3 issue starting happening with NatCam 2.0f2 and was extremely weird since it crashed in libunity.so/glDrawElements (which you said NatCam doesn't), but it *only* happened when I upgraded from NatCam 2.0f1 to NatCam 2.0f2. A total overhaul sounds like it might be worth checking out again, so I'll do that soon!

    Thanks! I don't necessarily need the pixel data in memory, I just wanted the cropped texture as a result. How would you do it via GPU? I tried Graphics.CopyTexture, which worked fine on Windows, but failed on Android. I don't remember how exactly, but I think the resulting texture was just completely white.

    Alright. That's not ideal for me, but at least it's "closest" and not "next lowest".
     
    Last edited: Dec 7, 2018
  43. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    You probably tried setting the preview and photo resolution on `NatCam.Camera`. If the preview is not running, `NatCam.Camera` will be null. Instead, get the camera that you will be starting the preview from and set the resolution there:
    Code (CSharp):
    1. var camera = DeviceCamera.RearCamera;
    2. camera.PreviewResolution = ...;
    3. camera.PhotoResolution = ...;
    4. NatCam.StartPreview(camera, ...);
    Setting the preview resolution, photo resolution, and framerate after the preview starts has no effect. You have to set these properties on the camera before calling `StartPreview` with that camera.
     
  44. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    In that case you can blit with a custom shader that performs the crop. You have to check if your Android device supports Graphics.CopyTexture.
     
    TobiasW likes this.
  45. funkenschlag

    funkenschlag

    Joined:
    Dec 12, 2016
    Posts:
    3
    Hello Lanre, I have an Apple iPad Pro 11" 2018. I would like to take fotos with the native resulution of the ipads cameras,(both are higher than full hd). Is this possible with NatCam api? Are there any Bugs with your current version and this ipad? thank you in advance.

    Edit: the exact modelname of the ipad is : mtxn2fd/a
     
  46. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    You can set the photo resolution on the device camera to an arbitrarily high value (like (9999, 9999)) and NatCam will pick the highest supported photo resolution for capture.
     
  47. jose_pedro_didimo

    jose_pedro_didimo

    Joined:
    May 2, 2018
    Posts:
    15
    Hi,
    I am running into issues on iOS. I was not using any torchmode reference but the camera was throwing an error so I tried forcing torch mode to be false. The error is still there. Is there anything I am missing here?

    Uncaught exception: NSInvalidArgumentException: *** -[AVCaptureDevice setTorchMode:] The passed torchMode 0 is not supported - use -isTorchModeSupported: to discover valid torch modes
     
  48. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    What is the error you face before you set torch mode to false?
     
  49. pontus_unity892

    pontus_unity892

    Joined:
    Nov 7, 2018
    Posts:
    7
    Hello! Just implemeted NatCam into our project and it's working great, except when i move the camera fast the screen starts tearing. Is there a way to fix this? At the moment i'm just using the NatCam.Preview texture.

    Thanks!
     
  50. jose_pedro_didimo

    jose_pedro_didimo

    Joined:
    May 2, 2018
    Posts:
    15
    I removed that line and there is no error now on iOS.
     
    Lanre likes this.