07-17-2024 08:31 AM
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.
Solved! Go to Solution.
07-17-2024 09:53 AM
Can you save your VI for Previous Version 2015 and attach that?
07-18-2024 03:11 AM
Yes, thank you.
07-18-2024 04:19 AM
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.
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.
07-18-2024 04:39 AM
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?
07-18-2024 06:20 AM
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.
07-18-2024 07:57 AM
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"?
07-18-2024 09:04 AM
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:
07-18-2024 09:21 AM
using the debugger I notice that it gives me an error at the columns enable. I don't understand what I'm missing
07-18-2024 09:26 AM
Thank you so much now it works!!!