Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to include and link Pylon library with OpenCV project

I am trying to access images from a Basler camera interfaced with a Jetson TX1. I am using OpenCV-C++ along with Pylon library to do so. I am trying to link the Pylon using cmake. I have the following CMakeLists.txt file:

cmake_minimum_required(VERSION 3.5.1)
project(basler_test)
set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl, -E")
find_package(OpenCV REQUIRED)
include_directories(/opt/pylon5/include)
link_directories(/opt/pylon5/lib64)
add_executable(basler_test basler_test.cpp)
target_link_libraries(basler_test ${OpenCV_LIBS} /opt/pylon5/include/pylon/PylonIncludes.h)

The camke . command works fine but when I do make, it gives:

fatal error: pylon/Platform.h: No such file or directory compilation terminated

I believe it's because something has not been set properly in the CMakeLists.txt. I don't have enough experience creating them to identify what's wrong. Kindly help.

How to include and link Pylon library with OpenCV project

I am trying to access images from a Basler camera interfaced with a Jetson TX1. I am using OpenCV-C++ along with Pylon library to do so. I am trying to link the Pylon using cmake. I have the following CMakeLists.txt file:

cmake_minimum_required(VERSION 3.5.1)
project(basler_test)
set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl, -E")
find_package(OpenCV REQUIRED)
include_directories(/opt/pylon5/include)
link_directories(/opt/pylon5/lib64)
add_executable(basler_test basler_test.cpp)
target_link_libraries(basler_test ${OpenCV_LIBS} /opt/pylon5/include/pylon/PylonIncludes.h)

The camke . command works fine but when I do make, it gives:

fatal error: pylon/Platform.h: No such file or directory compilation terminated

I believe it's because something has not been set properly in the CMakeLists.txt. I don't have enough experience creating them to identify what's wrong. Kindly help.

Edit: Here is the relevant part of the source file: basler_test.cpp

//This is a test program to check the functionality of Basler dart daA2500-14uc Camera.  

#define saveImages 0
#define recordVideo 1

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/video.hpp>
#include <pylon/PylonIncludes.h>
#ifdef PYLON_WIN_BUILD
#include <pylon/PylonGUI.h>
#endif

static const uint32_t c_countOfImagesToGrab = 10;

int main(int argc, char* argv[])
{
         ...................................
         ..................................
}

How to include and link Pylon library with OpenCV project

I am trying to access images from a Basler camera interfaced with a Jetson TX1. I am using OpenCV-C++ along with Pylon library to do so. I am trying to link the Pylon using cmake. I have the following CMakeLists.txt file:

cmake_minimum_required(VERSION 3.5.1)
project(basler_test)
set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl, -E")
find_package(OpenCV REQUIRED)
include_directories(/opt/pylon5/include)
link_directories(/opt/pylon5/lib64)
add_executable(basler_test basler_test.cpp)
target_link_libraries(basler_test ${OpenCV_LIBS} /opt/pylon5/include/pylon/PylonIncludes.h)

The camke . command works fine but when I do make, it gives:

fatal error: pylon/Platform.h: No such file or directory compilation terminated

I believe it's because something has not been set properly in the CMakeLists.txt. I don't have enough experience creating them to identify what's wrong. Kindly help.

Edit: Here is the relevant part of the source file: basler_test.cpp

//This is a test program to check the functionality of Basler dart daA2500-14uc Camera.  

#define saveImages 0
#define recordVideo 1

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/video.hpp>
#include <pylon/PylonIncludes.h>
#ifdef PYLON_WIN_BUILD
#include <pylon/PylonGUI.h>
#endif

static const uint32_t c_countOfImagesToGrab = 10;

int main(int argc, char* argv[])
{
         ...................................
         ..................................
}

How to include and link Pylon library with OpenCV project

I am trying to access images from a Basler camera interfaced with a Jetson TX1. I am using OpenCV-C++ along with Pylon library to do so. I am trying to link the Pylon using cmake. I have the following CMakeLists.txt file:

cmake_minimum_required(VERSION 3.5.1)
project(basler_test)
set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl, -E")
find_package(OpenCV REQUIRED)
include_directories(/opt/pylon5/include)
link_directories(/opt/pylon5/lib64)
add_executable(basler_test basler_test.cpp)
target_link_libraries(basler_test ${OpenCV_LIBS} /opt/pylon5/include/pylon/PylonIncludes.h)

The camke cmake . command works fine but when I do make, it gives:

fatal error: pylon/Platform.h: No such file or directory compilation terminated

I believe it's because something has not been set properly in the CMakeLists.txt. I don't have enough experience creating them to identify what's wrong. Kindly help.

Edit: Here is the relevant part of the source file: basler_test.cpp

//This is a test program to check the functionality of Basler dart daA2500-14uc Camera.  

#define saveImages 0
#define recordVideo 1

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/video.hpp>
#include <pylon/PylonIncludes.h>
#ifdef PYLON_WIN_BUILD
#include <pylon/PylonGUI.h>
#endif

static const uint32_t c_countOfImagesToGrab = 10;

int main(int argc, char* argv[])
{
         ...................................
         ..................................
}

How to include and link Pylon library with OpenCV project

I am trying to access images from a Basler camera interfaced with a Jetson TX1. I am using OpenCV-C++ along with Pylon library to do so. I am trying to link the Pylon using cmake. I have the following CMakeLists.txt file:

cmake_minimum_required(VERSION 3.5.1)
project(basler_test)
set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl, -E")
find_package(OpenCV REQUIRED)
include_directories(/opt/pylon5/include)
link_directories(/opt/pylon5/lib64)
add_executable(basler_test basler_test.cpp)
target_link_libraries(basler_test ${OpenCV_LIBS} /opt/pylon5/include/pylon/PylonIncludes.h)

The cmake . command works fine but when I do make, it gives:

fatal error: pylon/Platform.h: No such file or directory compilation terminated

I checked for the above file and it does exist in the same directory as PylonIncludes.h. So, I believe it's this error is because something has not been set properly in the CMakeLists.txt. I don't have enough experience creating them to identify what's wrong. Kindly help.

Edit: Here is the relevant part of the source file: basler_test.cpp

//This is a test program to check the functionality of Basler dart daA2500-14uc Camera.  

#define saveImages 0
#define recordVideo 1

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/video.hpp>
#include <pylon/PylonIncludes.h>
#ifdef PYLON_WIN_BUILD
#include <pylon/PylonGUI.h>
#endif

static const uint32_t c_countOfImagesToGrab = 10;

int main(int argc, char* argv[])
{
         ...................................
         ..................................
}

How to include and link Pylon library with OpenCV project

I am trying to access images from a Basler camera interfaced with a Jetson TX1. I am using OpenCV-C++ along with Pylon library to do so. I am trying to link the Pylon using cmake. I have the following CMakeLists.txt file:

cmake_minimum_required(VERSION 3.5.1)
project(basler_test)
set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl, -E")
find_package(OpenCV REQUIRED)
include_directories(/opt/pylon5/include)
link_directories(/opt/pylon5/lib64)
add_executable(basler_test basler_test.cpp)
target_link_libraries(basler_test ${OpenCV_LIBS} /opt/pylon5/include/pylon/PylonIncludes.h)

The cmake . command works fine but when I do make, it gives:

fatal error: pylon/Platform.h: No such file or directory compilation terminated

I checked for the above file and it does exist in the same directory as PylonIncludes.h. So, I believe this error is because something has not been set properly in the CMakeLists.txt. I don't have enough experience creating them to identify what's wrong. Kindly help.

Edit: Here is the relevant part of the source file: basler_test.cpp

//This is a test program to check the functionality of Basler dart daA2500-14uc Camera.  

#define saveImages 0
#define recordVideo 1

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/video.hpp>
#include <pylon/PylonIncludes.h>
#ifdef PYLON_WIN_BUILD
#include <pylon/PylonGUI.h>
#endif

static const uint32_t c_countOfImagesToGrab = 10;

int main(int argc, char* argv[])
{
         ...................................
         ..................................
}