LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Camera Basler 4 ROI

Solved!
Go to solution

Hi everyone, 

I'm using a basler camera that allows me to change the camera attributes and set 4 region of interest before acquiring the image. I want to change the dimensions of the four ROI in labview before acquiring a sequence of image, but I don't understand why it doesn't work. Someone has an idea?

thank you.

0 Kudos
Message 1 of 11
(638 Views)

Can you save your VI for Previous Version 2015 and attach that?

0 Kudos
Message 2 of 11
(615 Views)

Yes, thank you.

0 Kudos
Message 3 of 11
(570 Views)

Looking at the Basler documentation (https://docs.baslerweb.com/multiple-roi) and specifically the sample code it looks like BslMultipleROIColumnSelector expects an enum type input.

 

You could verify this by running the VI below, it should also tell you whether the function is available in the first place.

RamonG_0-1721293172853.png

 

Here is how you can readout the strings and values for this enum so you can make your own in LabVIEW. Note: if the values are not sequential and starting from 0 you will need to use a Ring instead.

 

RamonG_1-1721294106071.png

 

 

Download All
0 Kudos
Message 4 of 11
(562 Views)

Thank you it is so useful, but when I choose the value of the active attribute for the column and row selector and I select enumValues, I can attach only an indicator as output and I can't put anything as an input (it gives me an error if I want to attach a control or indicator and even a constant). How should I use the indicator?

0 Kudos
Message 5 of 11
(557 Views)

Yes, there no write value for enums, only for integers I64 and U32. Make sure to check which values need to be selected and whether the values need to be I64 or U32 (not sure if this will throw an error).

 

For visibility it's better is to create your own enums/rings.

 

RamonG_1-1721301512361.png

 

 

0 Kudos
Message 6 of 11
(544 Views)

yeah the values that I need are 0 and 1 and the need to be U32 but it still gives me an error: unable to set the attribute. How does it works the "column selection"?

0 Kudos
Message 7 of 11
(537 Views)
Solution
Accepted by topic author fra24

I have no experience with this camera but I would suggest:


On some camera models, you can only configure rows and not columns when you're creating regions. In this case, each region covers the entire sensor width and can be considered to have a single column.


  • Make sure the camera is idle, i.e., not capturing images.
  • Make sure the Reverse X and Reverse Y feature is disabled.
    You can re-enable image mirroring after configuring the rows and columns.


Note: To avoid undesired side effects, always configure the columns in ascending order, i.e., start with column 1, then configure column 2, and so on.

Check the exact ReverseX & ReverseY attributes in code below:

 

RamonG_1-1721310673765.png

 

0 Kudos
Message 8 of 11
(533 Views)

using the debugger I notice that it gives me an error at the columns enable. I don't understand what I'm missing

0 Kudos
Message 9 of 11
(529 Views)

Thank you so much now it works!!!

0 Kudos
Message 10 of 11
(526 Views)