Skip to content
firepick1 (pixel) edited this page Jul 7, 2014 · 20 revisions

Overview

This document is the reference document for FireREST™ configuration, which is specified by config.json. The config.json document enumerates and defines supported FireREST™ services and protocols for client as well as server discovery.

Example

Here is an example of config.json:

{ "FireREST":{"title":"Raspberry Pi FireFUSE","provider":"FireFUSE"},
  "cv":{
    "cve_map":{
      "calc-offset":{
	"firesight": [
	  {"op":"calcOffset", "name":"model", "minval":0.7, "roi":[350,50,100,100],
	    "xtol":32, "ytol":32, "channels":[], "template":"{{saved}}" },
	  {"op":"drawRects", "model":"model", "color":[32,255,32]}
	]
      },
      "locate-part":{
	"firesight": [
	  {"op":"absdiff", "path":"{{saved}}"},
	  {"op":"threshold", "type":"{{type}}", "thresh":"{{thresh}}", "maxval":"{{maxval}}"},
	  {"op":"morph", "ksize":"{{ksize}}", "mop":"{{mop}}", "iterations":"{{iterations}}", "shape":"{{shape}}"},
	  {"op":"minAreaRect", "name":"singleBlob", "min":"{{min}}", "max":"{{max}}", "channel":"{{channel}}"},
	  {"op":"stageImage", "stage":"input"},
	  {"op":"drawRects", "model":"singleBlob", "thickness":"{{thickness}}", "color":"{{color||[255,0,255]}}"}
	]
      }
    },
    "camera_map":{
      "1":{
	"width":800,
	"height":200,
	"profile_map":{
	  "gray":{ "cve_names":[ "calc-offset", "locate-part" ] },
	  "bgr":{ "cve_names":[ "calc-offset", "locate-part" ] }
	}
      }
    }
  }
}

Reference

The config.json JSON object defines the following configuration JSON objects:

Predefined configurations

Clone this wiki locally