#1
Posted
:
Tuesday, November 10, 2020 12:05:47 PM(UTC)
Groups: Registered
Posts: 3
Thanks: 1 times
In a project involving scanning driver licenses using the cameraview, I'm trying to implement a toggle-able preview window using .IsVisible.
I'm sticking the cameraview in smallish cell in a grid, and what the preview shows is not a scaled image of the entire field of view of the camera, but only the portion of it visible in the grid cell, relative to the entire screen.
Is that case or am I missing something?
For clarity - it seems like if I put a cameraview in row 0, column 1 of a 2*2 grid, the preview shows only the upper right portion of the camera's field of view. If the grid is in a stacklayout,
#2
Posted
:
Wednesday, November 11, 2020 4:48:09 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 105
Was thanked: 3 time(s) in 3 post(s)
Hello Will,
My name is Matt and I am a member of the LEADTOOLS Support Team.
I will be happy to assist you with any question you may have.
I ran a few tests in LEADTOOLS v21 with the grid view, stacklayout, and the CameraView. I found that using the code below allow the CameraView to be scaled to see the entire view of the camera, even if only a portion of the "mainGrid".
Code:<StackLayout>
<!--main grid container for everything-->
<Grid x:Name="mainGrid" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="c0" Width="*"/>
<ColumnDefinition x:Name="c1" Width="*"/>
<ColumnDefinition x:Name="c2" Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="r0" Height="*"/>
<RowDefinition x:Name="r1" Height="*"/>
<RowDefinition x:Name="r2" Height="*"/>
</Grid.RowDefinitions>
<namespace:CameraView x:Name="leadCamera" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"/>
</Grid>
</StackLayout>
Please see the attached screenshot for example. If the issue persists on your end, please feel free to reach back out to me.
Thanks
Matt Bresson
Developer Support Engineer
LEAD Technologies, Inc.
1 user thanked Matthew Bresson for this useful post.
#3
Posted
:
Monday, November 16, 2020 8:46:06 AM(UTC)
Groups: Registered
Posts: 3
Thanks: 1 times
Hey there, thank you. Is it possible to size the CameraView in an AbsoluteLayout as well?
#4
Posted
:
Monday, November 16, 2020 4:04:51 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 105
Was thanked: 3 time(s) in 3 post(s)
Hello Will,
Yes, you can size the CameraView in an AbsoluteLayout. See the code and screenshot below:
Code:
<AbsoluteLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<namespace:CameraView x:Name="leadCamera" AbsoluteLayout.LayoutBounds="0.25, 0.25, 0.5, 0.5" AbsoluteLayout.LayoutFlags="All"/>
</AbsoluteLayout>
Thanks
Matt Bresson
Developer Support Engineer
LEAD Technologies, Inc.
#5
Posted
:
Monday, November 16, 2020 4:43:48 PM(UTC)
Groups: Registered
Posts: 3
Thanks: 1 times
Thanks. I love this library.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.