Check homography #120

Closed
voidozzer wants to merge 1 commits from volodymyr/check-homography into master
2 changed files with 229 additions and 0 deletions
Showing only changes of commit 5e2fe35427 - Show all commits

View File

@ -2734,6 +2734,51 @@ export type GetAggregatedShotMetricsQuery = {
}>;
};
export type CheckHomographyIsValidMutationVariables = Exact<{
b64Image: Scalars["String"]["input"];
videoId: Scalars["Int"]["input"];
}>;
export type CheckHomographyIsValidMutation = {
__typename?: "Mutation";
checkHomographyIsValid?: {
__typename?: "HomographyInfoGQL";
frameIndex: number;
crop: {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
pockets: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
sourcePoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
destPoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
} | null;
};
export type GetDeployedConfigQueryVariables = Exact<{ [key: string]: never }>;
export type GetDeployedConfigQuery = {
@ -4269,6 +4314,121 @@ export type GetAggregatedShotMetricsQueryResult = Apollo.QueryResult<
GetAggregatedShotMetricsQuery,
GetAggregatedShotMetricsQueryVariables
>;
export const CheckHomographyIsValidDocument = gql`
mutation checkHomographyIsValid($b64Image: String!, $videoId: Int!) {
checkHomographyIsValid(b64Image: $b64Image, videoId: $videoId) {
frameIndex
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
destPoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
}
}
`;
export type CheckHomographyIsValidMutationFn = Apollo.MutationFunction<
CheckHomographyIsValidMutation,
CheckHomographyIsValidMutationVariables
>;
/**
* __useCheckHomographyIsValidMutation__
*
* To run a mutation, you first call `useCheckHomographyIsValidMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCheckHomographyIsValidMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [checkHomographyIsValidMutation, { data, loading, error }] = useCheckHomographyIsValidMutation({
* variables: {
* b64Image: // value for 'b64Image'
* videoId: // value for 'videoId'
* },
* });
*/
export function useCheckHomographyIsValidMutation(
baseOptions?: Apollo.MutationHookOptions<
CheckHomographyIsValidMutation,
CheckHomographyIsValidMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
CheckHomographyIsValidMutation,
CheckHomographyIsValidMutationVariables
>(CheckHomographyIsValidDocument, options);
}
export type CheckHomographyIsValidMutationHookResult = ReturnType<
typeof useCheckHomographyIsValidMutation
>;
export type CheckHomographyIsValidMutationResult =
Apollo.MutationResult<CheckHomographyIsValidMutation>;
export type CheckHomographyIsValidMutationOptions = Apollo.BaseMutationOptions<
CheckHomographyIsValidMutation,
CheckHomographyIsValidMutationVariables
>;
export const GetDeployedConfigDocument = gql`
query getDeployedConfig {
getDeployedConfig {

View File

@ -0,0 +1,69 @@
mutation checkHomographyIsValid($b64Image: String!, $videoId: Int!) {
checkHomographyIsValid(b64Image: $b64Image, videoId: $videoId) {
frameIndex
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
destPoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
}
}