Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Some commands like selectCamera and fillLayout require a cameraview parameter or comma separated list of cameraview parameters. A cameraview parameter consists of maximal 6 name:value pairs, separated by a semicolon (‘;’), see table below. Only the cameraid is required. A cameraid value of 0 will blank the corresponding panel. The order of the pairs is arbitrary.

If the server id is omitted, the server this command is send to will be used. If one of the cutout parameters is ommited, a default value of 0 is used for the left and top parameter and a default value of 1000 is used for the right and bottom parameter.

Parameters

Name

Value

Remarks

serverid

[uid]

Optional unique server id. When omitted, uses the default server.

cameraid

[uid]

Required unique camera id. A value of zero (0) blanks the panel. (deviceid works similar)

left

[0..1000]

Optional left position in promille for image cutout.

top

[0..1000]

Optional top position in promille for image cutout.

right

[0..1000]

Optional right position in promille for image cutout.

bottom

[0..1000]

Optional bottom position in promille for image cutout.

Query Examples

Example of the most elementary camera view:
cameraid:1

Example with serverid, fields separated by a semicolon (‘;’):
cameraid:1;serverid:8889181777222111211

Complete example:
cameraid:8001;serverid:1234567812345001;left:10;top:20;right:30;bottom:40

Mixed example:
top:21;right:300;serverid:1234567812345002;left:10;cameraid:80;bottom:40

Example with some missing cutout parameters.
cameraid:8001;right:500;bottom:500

Example of a simple cameraview list, cameraviews separated by a comma (‘,’):
cameraid:1,cameraid:2,cameraid:3,cameraid:4

Example of a more complex cameraview list,
(notice left and right for cameraid 3!):
cameraid:1;left=500;top=500,cameraid:2:right=500;top=500,cameraid:3;right=250;top=250;left=750;bottom=750,cameraid:4;left=100;top=100;right=400;bottom=400

Example of a complete cameraview list:
cameraid:81;serverid:1234567812345001;left:10;top:20;right:30;bottom:41, bottom:42;
cameraid:82;serverid:1234567812345002;left:12;top:22;right:32

Cutout

The image cutout parameters left, top, right and bottom are used to zoom in on the image. They select a part of the image that is displayed on the panel. The parameter values range from 0 up to 1000, representing a promile part of the image.

Left top of the image is considered as basepoint (0,0).

The original aspect ratio of the image is always maintained. Because the cutout parameters are promiles, the image aspect ratio is kept if the cutout width and height are the same. If the cutout width and height are not equal, the largest of the two is taken.

If the left value is larger then the right value, these values are swapped. The same goes for top and bottom. If the values are out of bounds, they are rounded to the nearest boundary. The visual examples will make things clear.

Example Description

The following examples all start with an image showing the original image (yellow), the image cutout (blue) and the resulting part of the image (cross pattern). Hereafter follows a calculation of the resulting image cutout. The cutout parameters are checked to see if they exceed boundaries and if they are reversed (right before left, bottom before top). The aspect ratio of the image is kept, the result has the same aspect ratio as the image (and the cutout aspect ratio after checking it is 1:1).

The cutout parameters show their recalculated values (to maintain aspect ratio) after the ‘—->’.

For all examples, a 4:3 image is used.

Cutout Examples

Example 1

Cutout with correct aspect ratio within borders.

Cutout parameters

(all values are in promille)

Left

200

Top

300

Right

700

Bottom

800

Result:

Width

500

Height

500

ZoomFactor

2

Result:

Example 2

Cutout with incorrect aspect ratio within borders.

Cutout parameters

(all values are in promille)

Left

500

Top

200

Right

800

Bottom

300 —-> 500 (corrected to match aspect ratio)

Result:

Width

300

Height

300

Zoomfactor

3.33333

Result:

Example 3

Cutout with incorrect aspect ratio within borders.

Cutout parameters 

(all values are in promille)

Left

300

Top

500

Right

400 —-> 600 (corrected to match aspect ratio)

Bottom

800

Result:

Width

100

Height

300

Zoomfactor

3.33333

Result

Example 4

Cutout with incorrect aspect ratio where the resulting cutout would pass the bottom border.

Cutout parameters 

(all values are in promille)

Left

500

Top

800

Right

800 —-> 700 (corrected to match aspect ratio)

Bottom

900 —-> 1000 (corrected to match aspect ratio)

Result:

Width

300 —-> 200 (corrected to match aspect ratio)

Height

100 —-> 200 (corrected to match aspect ratio)

ZoomFactor

5

Result

Example 5

Cutout with incorrect aspect ratio where the resulting cutout would pass the right border.

Cutout parameters 

(all values are in promille)

Left

800

Top

500

Right

900 —-> 1000

Bottom

900 —-> 700

Result:

Width

100 —-> 200

Height

400 —-> 200

ZoomFactor

5

Result

 

Example 6

Cutout with correct aspect ratio that passes the right border.

Cutout parameters 

(all values are in promille)

Left

800

Top

200

Right

1200 —-> 1000

Bottom

600 —-> 400

Result:

Width

400 —-> 200

Height

400 —-> 200

ZoomFactor

5

Result

 

Example 7

Cutout with incorrect aspect ratio that passes the right border.

Cutout parameters 

(all values are in promille)

Left

700

Top

500

Right

1100 —-> 1000

Bottom

600 —-> 800

Result:

Width

400 —-> 300

Height

100 —-> 300

ZoomFactor

3.3333333

Result

 

Example 8

Cutout with correct aspect ratio that passes the bottom border.

Cutout parameters 

(all values are in promille)

Left

500

Top

700

Right

900 —-> 800

Bottom

1100 —-> 1000

Result:

Width

400 —-> 300

Height

400 —-> 300

ZoomFactor

3.3333333

Result

 

Example 9

Cutout with incorrect aspect ratio that passes the bottom border.

Cutout parameters 

(all values are in promille)

Left

500

Top

700

Right

600 —-> 800

Bottom

1100 —-> 1000

Result:

Width

100 —-> 300

Height

400 —-> 300

Max

300

Aspect ratio

0.25 —> 1

ZoomFactor

3.3333333

Result

 

Example 10

Cutout with incorrect aspect ratio and reversed values that also passes all borders.

Cutout parameters 

(all values are in promille)

Left

1200 —-> 0

Top

1100 —-> 0

Right

-100 —-> 1000

Bottom

-100 —-> 1000

Result:

Width

-1300 —-> 1000

Height

-1200 —-> 1000

ZoomFactor

1

Result

  • No labels