CATA-SDK-EN
  1. Screen cropping
CATA-SDK-EN
  • Documentation
    • AI Recognition Precautions
    • Quick Start
    • SDK Error Code
    • AI Sequence Diagram
    • Screen Cropping
    • API Documentation (C language)
  • Activation
    • Activation Process
      • Step 1: Activate the device
      • Step 2: Download device configuration
      • Step 3: Download device model
    • Activate information import/export
      • Export activation data
      • Import activation data
    • View Device Activation Information
      GET
  • Common interfaces
    • Retrieve camera images
      GET
    • Retrieve status
      GET
    • retrieve logs
      GET
    • retrieve config
      GET
  • Recognition
    • Screen cropping
      • Screen cropping
        POST
      • Screen cropping config
        GET
    • Recognition
      GET
    • feedback
      POST
    • learning forgetting
      POST
    • clear learning data
      POST
    • save learning
      POST
  • learning export & import
    • export
      GET
    • import
      POST
  • camera
    • Obtain the installed camera
      GET
    • Set up the camera
      POST
  • goods
    • import product data
  • Product Image Matching
    • Download image
    • Match image
    • Edit image
  1. Screen cropping

Screen cropping

POST
/config/image-crop
Normalized Coordinates: Ensure the coordinates are normalized (values between 0 and 1) to maintain consistency across different image resolutions and devices.
Corner Points: Mark the four corners of the scale platform and use these points as the cropping area coordinates. This ensures accurate and consistent cropping across devices.
Mode Selection: Use the next mode for new devices and the origin mode for old devices to optimize recognition accuracy.
Data Synchronization: To ensure synchronization across multiple devices, standardize the cropping area coordinates during device setup and updates.

Request

Body Params application/json
points
array [object {2}] 
required
crop coordinates
x
number  | integer 
required
y
number  | integer 
required
mode
string 
required
Next or Origin, next new method, which can be used Don new devices, but not on old devices, otherwise the recognition rate will drop.
Example
{
  "points": [
    {
      "x": 0.1,
      "y": 0.3
    },
    {
      "x": 1,
      "y": 0
    },
    {
      "x": 1,
      "y": 1
    },
    {
      "x": 0,
      "y": 1
    }
  ],
  "mode": "Next"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:17339/config/image-crop' \
--header 'Content-Type: application/json' \
--data-raw '{
    "points": [
        {
            "x": 0.1,
            "y": 0.3
        },
        {
            "x": 1.0,
            "y": 0.0
        },
        {
            "x": 1.0,
            "y": 1.0
        },
        {
            "x": 0.0,
            "y": 1.0
        }
    ],
    "mode": "Next"
}'

Responses

🟢204success
application/octet-stream
Body
object {0}
Previous
retrieve config
Next
Screen cropping config
Built with