Giter Club home page Giter Club logo

matlab_baslercamdriver's People

Contributors

hbadertscher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

matlab_baslercamdriver's Issues

Error using baslerGetData

Failed to retrieve XML file from camera device '\?\usb#vid_2676&pid_ba02&mi_00#6&e265dc0&0&0000#{79bfeeca-947f-11e1-bc58-001b2163ef96}'.
Error: 'The requested operation timed out.'


i use pylon 5. Is this the problem?

Build error of make.m

Hi there,

I checked some similar issues, but I didn't find a solution for my problem. When it gets to mex on the make file, the error message is
"??? Error using ==> mex at 207
Unable to complete successfully"

with a possible hint before the error message saying

" C:\PROGRA~1\MATLAB\R2008A\BIN\MEX.PL: Error: Unrecognized switch: -std=c++0x."

I checked all the arguments for mex (flags{:},libraries{k,3},ipaths,lpaths,libraries{k,2}) and they seem alright (k =2). I'm supposing the problem is in ipaths and lpaths. This is what mex is receiving from both:

ipaths =

-I"C:\Program Files\Basler\pylon 4\pylon\include" -I"C:\Program Files\Basler\pylon 4\genicam\library\CPP\include" -I"C:\Program Files\boost\boost_1_60_0"
lpaths =

-L"C:\Program Files\Basler\pylon 4\pylon\lib\Win32" "C:\Program Files\Basler\pylon 4\genicam\library\CPP\Lib\win32_i86" "C:\Program Files\boost\boost_1_60_0\stage\lib"

In terms of directories, the paths should be fine. Is it missing some space between -I and "C:..." ?
Thanks!

Compilation problem: Boost libraries not found

Original post by @ntb13230

Hello,

I've found your files and I'm trying to use them with my Basler acA1920-25um camera. Following the fact that you have developed this for pylon4 that's what I've installed and also I got boost 1.55 After a while of struggling I got to the point where your make.m file finally finds pylon files properly, however i think there is a problem with the boost.

First of all in your make file , in libraries paths, the boost one has addition of 'stage\lib', but there is no such a path in this folder. I tried to change it for 'libs' but this fails as well. Where should this point to?

what i'm getting now while running the make file is this (sorry - very long):

>> make
=> Creating Libraries
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
=> Creating Functions
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
Error using mex
baslerGetParameter.cpp
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
: error C2332: 'enum' : missing tag name
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
: error C2236: unexpected 'class' 'ParamType'. Did you forget a ';'?
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
: error C3381: 'ParamType' : assembly access specifiers are only available in code compiled
with a /clr option
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(14)
: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(15)
: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(16)
: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(18)
: error C2143: syntax error : missing ';' before '}'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(18)
: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(40)
: error C2039: 'Float' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(40)
: error C2065: 'Float' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(41)
: error C2039: 'Int' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(41)
: error C2065: 'Int' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(42)
: error C2039: 'Bool' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(42)
: error C2065: 'Bool' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(43)
: error C2039: 'String' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(43)
: error C2065: 'String' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(86)
: error C2450: switch expression of type 'ParamType' is illegal
        No user-defined-conversion operator available that can perform this conversion, or the
        operator cannot be called
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(88)
: error C2039: 'Float' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(88)
: error C2065: 'Float' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(88)
: error C2051: case expression not constant
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(95)
: error C2039: 'Int' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(95)
: error C2065: 'Int' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(95)
: error C2051: case expression not constant
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(104)
: error C2039: 'Bool' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(104)
: error C2065: 'Bool' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(104)
: error C2051: case expression not constant
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(111)
: error C2039: 'String' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(111)
: error C2065: 'String' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(111)
: error C2051: case expression not constant
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(124)
: warning C4065: switch statement contains 'default' but no 'case' labels
Error in make (line 64)
            mex(flags{:},ipaths,lpaths,libraryObjects{:},drivers{k})

I don't know if that's something I'm doing wrong or... could you please have a look?
(btw - I'm using Matlab 2015a, 64 bit)

Thank you!

Problem with baslerSetParameter() for Boolean types

Dear Mr. Badertscher
I'm a German Student working on a project to design an app which is supposed to do a live-PIV.
Used is the camera: Basler acA1300-200um

Now as I was designing the interface i noticed that i have problems with the baslerSetParameter() function in matlab. All other functions work perfectly on my computer as far as i can see.
It's possible to set boolean parameters to 1 but not back to 0.
If the option verbose is active, the output always tells me that the parameter is being set to 1. There's no difference between typing 1 or 0, the result is always 1. I tried logical(0),logical(false), ~1 and boolean(0).
My command looks like this:
baslerSetParameter(0,'ReverseX',logical(0),1)

Output:
Using camera "acA1300-200um"
Set Parameter "ReverseX" to 1

Have you got any idea where this problem comes from or how to solve it? If you are interested in the project I'm more than happy to tell you about it. For the project i use the Pylon Viewer 4.
Thank you very much in advance.

Greetings
Florian Huber

Trying and failing to install Boost

Hi,

I'm trying to get your software to work, since it is exactly what I'm looking for. Unfortunately, I can't get the Boost to install properly. The installation instructions are basically so vague that I have no clue what to do after downloading it. The bootstrapper gives an error and the b2 file isn't even in the installation package (I'm assuming the bootstrapper should have created it)

Do you know of a detailed installation guide for Boost? I already looked for help using Google and the Boost website, but I couldn't find one.

The bootstrapper error: " 'cl' is not recognized as an internal or external command, operable program or batch file. " <-- I have no clue what that means or how to solve it.

Cannot build, mex fails with no information

I am trying to build, configured msvc, but still get this error. Any hints? Using R2015b.

>> cd ..
>> make
=> Creating Libraries
Building with 'Microsoft Visual C++ 2013 Professional'.
Error using mex


Error in make (line 56)
            mex(flags{:},libraries{k,3},ipaths,lpaths,libraries{k,2})   % build

Another make build issue

Using R2015a, Windows 7 64-bit.

Followed all the directions for installation of C++ compiler, BOOST, and even tried the guide provided here: https://github.com/Lansbergen/BaslerCamDriver_Installation_Tutorial_Windows_7

The build process errors out when it is almost finished creating all the functions. Command window output shows:

make
=> Creating Libraries
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
=> Creating Functions
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
Error using mex
LINK : fatal error LNK1104: cannot open file
'libboost_filesystem-vc100-mt-1_53.lib
Error in make (line 63)
mex(flags{:},ipaths,lpaths,libraryObjects{:},drivers{k}) `

Not sure what to do to fix it, since I'm an amateur at all of this, but I'd really like to use my new Basler cam in MATLAB.

Compilation Problem

Hi,

I followed through the installation guide until the last compilation step. And it gave me the following error message:
fatal error C1083: Cannot open include file: 'pylon/PylonIncludes.h': No such file or directory

It seems to be missing a header file. I am wondering how I can resolve this issue.

Thanks,
Kevin

Simultaneous preview and capture

According to @smwasser it would be helpful to be able to simultaneously capture a video and have the preview to watch an experiment.

Is this possible? Probably something based on baslerPreview.m, which saves the image using MATLAB. This will probably be too slow for high frame rates -- maybe better a C++ implementation based on baslerSaveData.cpp?

Pylon5 and triggered acquisition

Hi, for a project I need to enable the acquisition in response to external triggers and I have Pylon5. Are there any recommendations for this? Does the driver work with the newest Pylon versions and can triggers be enabled without problems? Thanks!

Add decent input parser

Parse and verify the types and values of input parameters better, so no unclear error messages can appear.

Can't get it compiled on Windows 7 and Matlab2014a

Hi folks,

I can't get the Basler driver compiled on my system. Please help!
This is what I have done so far: I have downloaded Boost 1.55.0 and Pylon 4.2 . Since boost does not compile on my system (don't know why), I downloaded the precompiled binaries and supposed that the binaries are in the folder "lib64-msvc-10.0" (there is no folder stage/libs in my Boost folder). Hence I changed in the make script the line with "stage/libs" to "lib64-msvc-10.0". No effect. The linker paths to the pylon stuff are correct. Any ideas?

Here is the Matlab output:

>> make
=> Creating Libraries
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
=> Creating Functions
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
Error using mex
baslerGetParameter.cpp
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
: error C2332: 'enum' : missing tag name
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
: error C2236: unexpected 'class' 'ParamType'. Did you forget a ';'?
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
: error C3381: 'ParamType' : assembly access specifiers are only
available in code compiled with a /clr option
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(14)
: error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(15)
: error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(16)
: error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(18)
: error C2143: syntax error : missing ';' before '}'
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(18)
: error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(40)
: error C2039: 'Float' : is not a member of 'ParamType'
        D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(40)
: error C2065: 'Float' : undeclared identifier
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(41)
: error C2039: 'Int' : is not a member of 'ParamType'
        D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(41)
: error C2065: 'Int' : undeclared identifier
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(42)
: error C2039: 'Bool' : is not a member of 'ParamType'
        D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(42)
: error C2065: 'Bool' : undeclared identifier
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(43)
: error C2039: 'String' : is not a member of 'ParamType'
        D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(43)
: error C2065: 'String' : undeclared identifier
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(86)
: error C2450: switch expression of type 'ParamType' is illegal
        No user-defined-conversion operator available that can perform
        this conversion, or the operator cannot be called
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(88)
: error C2039: 'Float' : is not a member of 'ParamType'
        D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'


D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(88)
: error C2065: 'Float' : undeclared identifier

D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(88)
: error C2051: case expression not constant
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(95)
: error C2039: 'Int' : is not a member of 'ParamType'
        D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(95)
: error C2065: 'Int' : undeclared identifier
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(95)
: error C2051: case expression not constant
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(104)
: error C2039: 'Bool' : is not a member of 'ParamType'
        D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(104)
: error C2065: 'Bool' : undeclared identifier
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(104)
: error C2051: case expression not constant
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(111)
: error C2039: 'String' : is not a member of 'ParamType'
        D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(111)
: error C2065: 'String' : undeclared identifier
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(111)
: error C2051: case expression not constant
D:\Mitarbeiter\Christian\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(124)
: warning C4065: switch statement contains 'default' but no 'case'
labels



Error in make (line 63)
            mex(flags{:},ipaths,lpaths,libraryObjects{:},drivers{k})

>>

Error compiling code with make.m

I get the following error when I try to run make.m file.

make
=> Creating Libraries
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
=> Creating Functions
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
Error using mex
baslerGetParameter.cpp
D:\Downloads\Matlab_BaslerCamDriver-master\Matlab_BaslerCamDriver-master\baslerGetParameter.cpp(39) : error C2039: 'map' : is not a member of 'std'
D:\Downloads\Matlab_BaslerCamDriver-master\Matlab_BaslerCamDriver-master\baslerGetParameter.cpp(39) : error C2065: 'map' : undeclared identifier
D:\Downloads\Matlab_BaslerCamDriver-master\Matlab_BaslerCamDriver-master\baslerGetParameter.cpp(39) : error C2275: 'std::string' : illegal use of this type as an expression
D:\Downloads\Matlab_BaslerCamDriver-master\Matlab_BaslerCamDriver-master\baslerGetParameter.cpp(39) : error C2065: 'paramMap' : undeclared identifier
D:\Downloads\Matlab_BaslerCamDriver-master\Matlab_BaslerCamDriver-master\baslerGetParameter.cpp(39) : error C2275: 'ParamType' : illegal use of this type as an expression
D:\Downloads\Matlab_BaslerCamDriver-master\Matlab_BaslerCamDriver-master\baslerGetParameter.cpp(13) : see declaration of 'ParamType'
D:\Downloads\Matlab_BaslerCamDriver-master\Matlab_BaslerCamDriver-master\baslerGetParameter.cpp(86) : error C2065: 'paramMap' : undeclared identifier

Error in make (line 63)
mex(flags{:},ipaths,lpaths,libraryObjects{:},drivers{k})

Make uses x64 by default

In the lib paths, the make file uses the x64 versions. It would be better to check if the system is 32bit or 64bit and compile accordingly.

Mex won't find header files that are called via #include <header.h> even though they are in include path

I have set up boost and pylon 4, and defined all the env variable but I have this strange thing that the compiler won't find header files that are specified within a header file via

#include <pylon/PylonInclude.h>,

even thought "pylon/PylonInclude.h" is in the include paths via the -I option. Changing

#include <pylon/PylonInclude.h>

into

include "fullpath/pylon/PylonInclude.h"

works, but of course, I don't want to change all the header files. There seems to be a similar question to this on Stack Overflow and this one on Mathworks, however, no solutions are presented. There must be something I am missing, such as setting C++ global variables or similar, so any help is appreciated!

Here is the minimal code I use to debug the issue:

libraries = {  'basler_helper', 'basler_set_get.cpp',      '-c';      ...
               'private',  'baslerGetRawCameraParams.cpp', '';       ...
            };
ipaths = [  '-I' fullfile(getenv('PYLON_ROOT'),'include') '-I' fullfile(getenv('PYLON_GENICAM_ROOT'),'library\CPP\include') '-I' fullfile(getenv('BOOST_ROOT'))]
lpaths = [  '-L' fullfile(getenv('PYLON_ROOT'),'lib\x64') '-L' fullfile(getenv('PYLON_GENICAM_ROOT'),'\library\CPP\Lib\win64_x64') '-L' fullfile(getenv('BOOST_ROOT'),'stage\lib')];
flags = {   '-largeArrayDims',...
            'CXXFLAGS=$CXXFLAGS -std=c++0x -fpermissive -fPIC -DNDEBUG', ...
            ... '-g', ...      % debug symbols
            ... '-v', ...      % verbose
        };

mex(flags{:},libraries{1,3},ipaths,lpaths,libraries{1,2})

trigger mode

Hi,

Recently I have been trying to set up a Basler USB3.0 camera, and I encountered a problem with the TriggerMode parameter: it cannot be set as ‘On' for data acquisition. To be specific, the TriggerMode parameter can be set as ‘On’ using either the baslerSetParameter function or the Pylon software (the status of the parameter is verified in Pylon). However, once the baslerGetParameter function or the baslerGetData function or the baslerSetParameter function (setting up other parameters) is applied to the camera, this TriggerMode parameter would automatically be ‘Off’. Besides, other parameters such as ‘Width’ and ‘PixelFormat’ work fine with all the functions above.

My naive guess would be that the camera initialization overwrites some settings, but couldn't figure out why and where it is. Would you have any suggestions? Thanks a lot!

Compilation problem

Hello,

Thank you for sharing your library to access Basler cameras.

I tried to compile under Linux with Pylon v.4 and v.5. In both cases I had the following error:

basler_set_get.cpp: In function ‘double BaslerHelper::get_float(Pylon::CInstantCamera*, const char*, bool)’:
basler_set_get.cpp:94:57: error: conversion from ‘GenICam::gcstring’ to non-scalar type ‘std::__cxx11::string {aka
std::__cxx11::basic_string}’ requested
std::string s_result = p_parameter->ToString();

Do you have any idea of what I am doing wrong here?

Thank you for your help,

L Denis

Pylon 4 x64

Hi! thank you for your contribution.

Do you happen to have pylon x64 version 4?
Currently, only version 5 is available on Basler download page.

All the best,
Bega

Trigger

Hi,

does this driver support for setting up the external trigger function of the camera? I'd like to use it in Matlab, but need the ability to trigger the camera.

Thanks!

Color Images don't work

BaslerHelper::capture_images does not handle color images correctly! To be verified with a Color camera.

cannot run make.m with Microsoft Visual C++ 2013

Hello,

Here is the error message I get:

make
=> Creating Libraries
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
=> Creating Functions
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
Error using mex
LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc120-mt-1_60.lib'

Error in make (line 63)
mex(flags{:},ipaths,lpaths,libraryObjects{:},drivers{k})

Compilation issue

I cannot currently get the code to "make" successfully.
I have tried : MEX configured to use 'Microsoft Visual C++ 2012' for C++ language compilation and
VisualStudio 2010.

With Visual C++ 2012 I get for the compilation of the Function baslerGetData.cpp

Error using mex
Creating library baslerGetData.lib and object baslerGetData.exp
baslerGetData.obj : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)"
(?system_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::dynamic initializer for 'native_ecat''(void)" (??__Enative_ecat@system@boost@@YAXXZ) baslerGetData.obj : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::dynamic initializer for 'errno_ecat''(void)"
(??__Eerrno_ecat@system@boost@@yaxxz)
baslerGetData.obj : error LNK2019: unresolved external symbol "void __cdecl boost::filesystem::path_traits::convert(wchar_t const *,wchar_t const *,class
std::basic_string<char,struct std::char_traits,class std::allocator > &,class std::codecvt<wchar_t,char,int> const &)"
(?convert@path_traits@filesystem@boost@@YAXPEB_W0AEAV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@aebv?$codecvt@_WDH@5@@z) referenced in function
"void __cdecl boost::filesystem::path_traits::convert(wchar_t const *,wchar_t const *,class std::basic_string<char,struct std::char_traits,class
std::allocator > &)" (?convert@path_traits@filesystem@boost@@YAXPEB_W0AEAV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z)
baslerGetData.obj : error LNK2019: unresolved external symbol "public: static class std::codecvt<wchar_t,char,int> const & __cdecl
boost::filesystem::path::codecvt(void)" (?codecvt@path@filesystem@boost@@SAAEBV?$codecvt@_WDH@std@@xz) referenced in function "void __cdecl
boost::filesystem::path_traits::convert(wchar_t const *,wchar_t const *,class std::basic_string<char,struct std::char_traits,class std::allocator > &)"
(?convert@path_traits@filesystem@boost@@YAXPEB_W0AEAV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z)
baslerGetData.mexw64 : fatal error LNK1120: 4 unresolved externals

AND With VisualStudio2010 I get:
Error using mex
baslerGetParameter.cpp
C:\projects\Basler\baslerGetParameter.cpp(13) : error C2332: 'enum' : missing tag name
C:\projects\Basler\baslerGetParameter.cpp(13) : error C2236: unexpected 'class' 'ParamType'. Did you forget a ';'?
C:\projects\Basler\baslerGetParameter.cpp(13) : error C3381: 'ParamType' : assembly access specifiers are only available in code compiled with a /clr option

I guess this one is due to C++11 ?

But I dont know how to solve either.

I also have VisualStudio 2015 Community (not professional), but I am not sure if Matlab mex can run with this.

run make.m got : error Unknown shared library support

some error: D:\Program Files\Basler\pylon 5\Development\include/pylon/Platform.h:127:5: error: #error Unsupported platform.
if it is about the version of pylon ? because i use pylon 5 rather than pylon 4 due to i cann't install the older version.

Problem when connecting multiple cameras

Hello,

When multiple cameras are connected, it seems to read the indices of the cameras in an complete arbitrary manner, for example, if 3 cameras are connected, when I set the parameter for camera 2:
baslerSetParameter(2, 'ExposureTimeAbs', 1000)
then I want to check the parameter I just set: baslerGetParameter(2,'ExposureTimeAbs','double')
It will randomly return the parameter of one of the three cameras.

I think that getting the cameras by its DeviceSerialNumber would work, unfortunately, I'm not quite familiar with C++, could you offer some suggestions? @HBadertscher

Thanks a lot!

Compilation error

Hi,

I am having some problems compiling, I get this error:
Error using mex
LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-1_62.lib'

I am using pylon 4 and Windows 7 .

Do you have any idea what can be the problem here?

Many thanks,
Mihai

Save Video as .avi

For 8-bit images, it is possible to save the video as .avi file. This might be more convenient in some cases.

Add an optional parameter to baslerSaveData which will save the data as .avi

MATLAB: Building with 'Microsoft Windows SDK 7.1 (C++)' error

Hey guys,

currently i'm working on an engineering project where i want to use the Matlab_BaslerCamDriver package offered for the Basler USB 3.0 cams.
Some further informations about the steps and the setup done by myself in the last days:

  • Basler cam model: Baser acA4024-29um
  • MATLAB ver R2017b installed under path C:\program\MATLAB\R2017b...
  • Pylon ver 4 installed under path C:\program\Basler\pylon 4...
  • Boost ver 1.55.0 for x64 with lib64-msvc-10.0 installed under C:\boost_1_55_0...
  • installed Windows .Net framework 4
  • installed Windows SDK 7.1
  • installed Microsoft Visual C++ 2010 x64 (+x86) Redistributable 10.0.30319 (also checked that the ammintrin.h is set correctly in the Visual Studio 10.0\vc\include folder).
  • make.m: changed line 45 to --> ' ','"',fullfile(getenv('BOOST_ROOT'),'lib64-msvc-10.0'),'"', ...
  • baslerGetParameter.cpp: changed line 13 to --> enum ParamType {
  • in MATLAB under Home --> Set Path included all folders with subfolders for the offered Camera Driver package, Boost folders, Pylon folders, Microsoft Visual Studio 10.0 folders
  • used MATLAB command mex -setup c++ and it worked correctly so the MEX is configured to use the Microsoft Windows SDK 7.1 (C++) compiling method
  • tried to use MATLAB command make for compiling the make.m-file but got the following error messages:

>> make
=> Creating Libraries
Building with 'Microsoft Windows SDK 7.1 (C++)'.
Error using mex
cl : Command line warning D9021 : no action performed

cl : Command line warning D9024 : unrecognized source file type 'Files\MATLAB\R2017b\extern\include -IC:\Program', object file
assumed
cl : Command line warning D9027 : source file 'Files\MATLAB\R2017b\extern\include -IC:\Program' ignored
cl : Command line warning D9024 : unrecognized source file type 'Files\MATLAB\R2017b\simulink\include  /DMX_COMPAT_64
/DUSE_MEX_CMD   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG
C:\Basler_matlab_camdriver\basler_helper\basler_set_get.cpp /Fobasler_set_get.obj ', object file assumed
cl : Command line warning D9027 : source file 'Files\MATLAB\R2017b\simulink\include  /DMX_COMPAT_64  /DUSE_MEX_CMD
/D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0  /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG
C:\Basler_matlab_camdriver\basler_helper\basler_set_get.cpp /Fobasler_set_get.obj ' ignored


Error in make (line 56)
            mex(flags{:},libraries{k,3},ipaths,lpaths,libraries{k,2})   % build

Actually i don't have any idea how to fix this.
Hope somebody is able to help me out with this error messages.
Thanks in advance!!!!

All the best,
André

Opening and Closing the camera for each task = long time lost

Hi,

I'm having some issue with the speed of the preview, it looks like the camera opens and closes for each frame of the preview.
When I want to get data from more than 1 frame, the time looks way shorter in comparison :

For instance here with 1 and 10 frames.

tic
baslerGetData(0,1,'Mono8');
toc
Elapsed time is 2.733215 seconds.

tic
baslerGetData(0,10,'Mono8');
toc
Elapsed time is 3.343008 seconds.

I need to watch the camera view in real time, with a better speed than one frame every 3 seconds.
Do you have any of how I can do ?

Thanks

Problem with make in Matlab 2017b on Mac

Hoi Mr Badertscher,

Thank you for providing a way to access Basler cameras through Matlab.

I downloaded the entire package on my Matlab 2017b and tried to compile it using the "make" command. I get an error as follows:

>> make
=> Creating Libraries
Building with 'Xcode Clang++'.
Error using mex
In file included from /Users/harshakasi/Documents/MATLAB/Add-Ons/Collections/Basler
camera
driver/code/HBadertscher-Matlab_BaslerCamDriver-419332a/basler_helper/basler_set_get.cpp:5:
./basler_set_get.h:8:10: fatal error: 'pylon/PylonIncludes.h' file not found
#include <pylon/PylonIncludes.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.


Error in make (line 56)
            mex(flags{:},libraries{k,3},ipaths,lpaths,libraries{k,2})   % build

Please inform me as to how can I go about rectifying this and getting the whole package successfully compiled and use the APIs as I would like them.

Best,
HK

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.