NI Vision OpenCV Utilities "nivisocvsamples" Library Not Found

Updated Apr 18, 2023

Reported In

Software

  • LabVIEW
  • Vision Development Module

Other

NI Vision OpenCV Utilities

Issue Details

When I try to use OpenCV example VIs in LabVIEW, I get the following error:
Call Library Function Node 'nivisocvsamples.*:NIVisOpenCV_AKAZEMatchImages': Library not found or failed to load

Solution

Make sure that the Vision Development Module (VDM) is installed and activated on the system. If VDM is installed, this error can occur because the necessary OpenCV libraries have not been placed in the correct folders during package installation. It can be done manually by taking the following steps:
 
1. Navigate to C:\Program Files (x86)\National Instruments\NIVision OpenCV Utilities folder on your computer. Note: even if LabVIEW 64-bit version is used, this folder will appear under Program Files (x86).
 
2. Copy all the files from the following folders:
  • LabVIEW 32-bit:
    • C:\Program Files (x86)\National Instruments\NIVision OpenCV Utilities\nivisionextlib\samples\x86\vc140\bin
    • C:\Program Files (x86)\National Instruments\NIVision OpenCV Utilities\nivisionextlib\x86\vc90\bin
    • C:\Program Files (x86)\National Instruments\NIVision OpenCV Utilities\opencv\x86\vc140\bin
    • C:\Program Files (x86)\National Instruments\NIVision OpenCV Utilities\tbb\x86\bin
  • LabVIEW 64-bit:
    • C:\Program Files (x86)\National Instruments\NIVision OpenCV Utilities\nivisionextlib\samples\x64\vc140\bin
    • C:\Program Files (x86)\National Instruments\NIVision OpenCV Utilities\nivisionextlib\x64\vc90\bin
    • C:\Program Files (x86)\National Instruments\NIVision OpenCV Utilities\opencv\x64\vc140\bin
    • C:\Program Files (x86)\National Instruments\NIVision OpenCV Utilities\tbb\x64\bin

3. Paste these files into the following folders based on LabVIEW bitness:
  • LabVIEW 32-bit:
    • C:\Program Files (x86)\National Instruments\LabVIEW 2019\vi.lib\OpenCV\Object Detect
  • LabVIEW 64-bit:
    • C:\Program Files\National Instruments\LabVIEW 2019\vi.lib\OpenCV\Object Detect

4. If the VIs still give the same error, place NIVisOpenCV Facedetection.vi on your block diagram:
5. Double click on it and open the block diagram on the new VI. Then double click on the Call Library Function Node:
6. Click on the folder button and select one of the following items:
  • LabVIEW 32-bit:
    • C:\Program Files (x86)\National Instruments\LabVIEW 2019\vi.lib\OpenCV\Object Detect\nivisocvsamples.*
  • LabVIEW 64-bit:
    • C:\Program Files\National Instruments\LabVIEW 2019\vi.lib\OpenCV\Object Detect\nivisocvsamples.*