Understanding the structure of the GameDefinition
JSON object used in Game Pop.
The GameDefinition
JSON object contains several key properties. Each field in this object provides critical information related to text detection for Game Pop. The structure is as follows:
{
"id": int, // Unique identifier for the text definition
"name": string, // Name of the text definition
"durations": [ // List of duration objects for time-based metadata
{ "start": int, "end": int }
],
"searchTerms": [ // List of search terms to identify text
{ "term": string }
],
"cropArea": { // Defines the area of the image for text detection
"x": int, "y": int,
"width": int, "height": int
},
"imageType": int, // Type of image being detected (currently Text = 0)
"processName": string, // Name of the process associated with detection
"lang": string // Language of the text (e.g., "en" for English)
}
Each field in the TextDefinition
JSON object is important for handling text detection:
start
and end
times, representing when this text is relevant (useful for time-sensitive events).term
.x
, y
, width
, and height
) where the text detection should focus.0
- Text (additional types will be supported in future)."en"
for English, "fr"
for French).Here is an example of a complete TextDefinition
JSON object:
{
"id": 1,
"name": "Queue Pop Notification",
"durations": [
{ "start": 0, "end": 60 }
],
"searchTerms": [
{ "term": "Queue Popped" }
],
"cropArea": {
"x": 100,
"y": 50,
"width": 200,
"height": 50
},
"imageType": 0,
"processName": "WoW",
"lang": "en"
}
This JSON object defines a text detection rule for the World of Warcraft queue pop notification. It includes the crop area for the text on the screen, relevant search terms, and language settings.