Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, November 10, 2020 12:05:47 PM(UTC)

Will S  
Will S

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,



 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, November 11, 2020 4:48:09 PM(UTC)
Matthew Bresson

Groups: Registered, Tech Support, Administrators
Posts: 98

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.

PortionoftheGrid.jpg

Thanks
Matt Bresson
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS
thanks 1 user thanked Matthew Bresson for this useful post.
Will S on 11/16/2020(UTC)
 
#3 Posted : Monday, November 16, 2020 8:46:06 AM(UTC)

Will S  
Will S

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)
Matthew Bresson

Groups: Registered, Tech Support, Administrators
Posts: 98

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>


AbsoluteLayout.jpg

Thanks
Matt Bresson
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS
 
#5 Posted : Monday, November 16, 2020 4:43:48 PM(UTC)

Will S  
Will S

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.081 seconds.