VideoCAD

Patterns

 Structure of pattern file

Hide Navigation Pane

Patterns

 Structure of pattern file

Previous topic Next topic No directory for this topic No expanding text in this topic  

Patterns

 Structure of pattern file

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

for manufacturers, distributors and skilled designers

 

You can add, delete, save patterns to files using the Patterns window, which can be called up through the Patterns main menu item. The Calculator does not have a built-in pattern editor. You can edit patterns using any XML file editor or text editor. Before editing, the pattern must be saved to a file using the Patterns window. After editing, load the edited pattern file again.

 


 

<FRAME_SIZE_CALCULATION_PATTERN<*the beginning of pattern file *>

Horizontal_resolution_of_test_frames="640" <*horizontal resolution of video stream frames at traffic measurement [note 1]]*>

Vertical_resolution_of_test_frames="480" <*vertical resolution of video stream frames at traffic measurement [note 1]*>

General_corrective_factor="1" <*factor by which all traffic values of all compression types will be multiplied [note 2]*>

General_corrective_addon="0" <*summand which will be added to all traffic values of all compression types [note 2]*>

<CAMERA_MODELS><*the beginning of the camera model list*>

  <MODEL_1>Axis 211</MODEL_1><*In the separate lines, there are names of camera models for which the pattern can be applied. If in the Model field, a model name from this list is present, the calculation for this camera will be carried out according to this pattern.*>

 

  *** <*other camera models*>

 

 </CAMERA_MODELS><*the end of the camera model list*>

<COMPRESSION_TYPES><*the beginning of descriptions of compression types*>

   <COMPRESSION_1 <*the beginning of description of the first compression type*>

  Compression_name="Motion JPEG" <*The name of the first compression type (the names of compression types will be present in the drop-down list of the Compression>Type field if this pattern will be chosen)*>

   Stream="0"<*0 – frame-by-frame compression (Motion JPEG) or 1- interframe compression (MPEG, H.264)*>

  Sound_addon_kbit_per_sec="32" <* the sound traffic, it is added if the Sound field is checked*>

  Noise_factor="1,2"<*the factor on which a result will be multiplied at each increase of noise level in the Scene> Noise field*>

  Compression_corrective_factor="1" <*factor by which all traffic values of this compression type will be multiplied [note 2]*>

   Compression_corrective_addon="0" <*summand which will be added to all traffic values of this compression type [note 2]*>

    <COMPRESSION_LEVELS><*the beginning of descriptions of compression levels of first compression type*>

      <COMPRESSION_LEVEL_1 <*the beginning of description of the first compression level of first compression type*>

      Level_name="10 (max quality)" <*The name of the first compression level of first compression type (the names of compression levels will be present in the drop-down list of the Compression>Level field if this pattern and this compression type will be chosen) *>

      Black_and_White_factor="0,7" <*Factor by which traffic value of this compression type will be multiplied if the Camera>B/W field is checked*>

        <FPS_LEVELS><*the beginning of descriptions of fps levels of first compression type and first compression level*>

          <FPS_LEVEL_1 <*the beginning of descriptions of first fps level of first compression type and first compression level*>

        Fps="1"<*number of frames per second of this fps level (for this fps, traffic value below is measured)*>

           Average_bytes_per_sec_of_test_frames="52875" <*the measured traffic generated by camera with the first compression type, first compression level and first fps level for an average scene [note 1]*>

          Scene_compexity_factor="1,6" <*scene complexity factor. The relation of the traffic of the most complex scene to the traffic of the simplest scene [note 6]*>

          Scene_activity_factor="1"><*scene activity factor.  The relation of the traffic of the most changeable scene to the traffic of the most constant scene [note 6]*>

            <REAL_SCENES> <*the beginning of descriptions of real scenes [note 3]*>

               <SCENE_1

              Real_scene_name="Scene 1" <*the name of the first real scene*>

              Average_bytes_per_sec_of_test_frames="52875"/><*the measured traffic generated by camera with the first compression type, first compression level and first fps level for the first real scene [note 1]*>

 

             *** <*The structure of the description of other scenes is similar to the first scene above*>

         

           </REAL_SCENES><*the end of descriptions of real scenes [note 3]*>

           </FPS_LEVEL_1>< *the end of descriptions of first fps level of first compression type and first compression level*>

 

          *** <*The structure of the description of other fps levels is similar to the first fps level above*>

 

         </FPS_LEVELS><*the end of descriptions of fps levels of first compression type and first compression level*>

       </COMPRESSION_LEVEL_1><*the end of description of the first compression level of first compression type*>

 

       ***      <*The structure of the description of all compression levels is similar to the first compression level above*>

 

     </COMPRESSION_LEVELS><*the end of descriptions of compression levels of first compression type*>

    <PIXEL_COUNT_FACTORS><*10 optional factors correcting the traffic depending on number of pixels in the image. Unused factors must be equal 1.0 [note 5]*>

       <Pixels_factor_1 Pixel_count="100000" Factor="1"/> <*in each line Pixel_count=<number of pixels> and Factor=<factor>*>

       <Pixels_factor_2 Pixel_count="300000" Factor="1"/>

       <Pixels_factor_3 Pixel_count="450000" Factor="1"/>

       <Pixels_factor_4 Pixel_count="1000000" Factor="1"/>

       <Pixels_factor_5 Pixel_count="2000000" Factor="1"/>

       <Pixels_factor_6 Pixel_count="4000000" Factor="1"/>

       <Pixels_factor_7 Pixel_count="6000000" Factor="1"/>

       <Pixels_factor_8 Pixel_count="8000000" Factor="1"/>

       <Pixels_factor_9 Pixel_count="10000000" Factor="1"/>

       <Pixels_factor_10 Pixel_count="12000000" Factor="1"/>

     </PIXEL_COUNT_FACTORS>

   </COMPRESSION_1><*the end of descriptions of first compression type*>

 

 ***  <*The structure of the description of compression types is similar to the first compression type above*>  

 

 </COMPRESSION_TYPES><*the end of descriptions of all compression types*>

 <RESOLUTIONS><*the beginning of the resolution list (the numbers will be present in the drop-down lists of the Pixels fields)*>

   <Res_1>320x240</Res_1>

   <Res_2>352x288 CIF</Res_2>

   <Res_3>480x270</Res_3>

   <Res_4>480x360</Res_4>

   <Res_5>640x360</Res_5>

   <Res_6>640x480</Res_6>

   <Res_7>704x240</Res_7>

   <Res_8>704x288</Res_8>

   <Res_9>704x480</Res_9>

   <Res_10>704x480</Res_10>

   <Res_11>704x576</Res_11>

   <Res_12>800x450</Res_12>

   <Res_13>800x600</Res_13>

   <Res_14>1024x576</Res_14>

   <Res_15>1024x768</Res_15>

   <Res_16>1280x1024</Res_16>

   <Res_17>1280x720</Res_17>

   <Res_18>1280x720 HDTV 720P</Res_18>

   <Res_19>1280x960</Res_19>

   <Res_20>1920x1080 HDTV 1080</Res_20>

 </RESOLUTIONS><*the end of the resolution list*>

</FRAME_SIZE_CALCULATION_PATTERN><*the end of the pattern file*>

 

 

 

Note 1:

Horizontal_resolution_of_test_frames * ' 'Vertical_resolution_of_test_frames' are  numbers of pixels of frames of video streams, whose traffic is specified in the fields ' Average_bytes_per_sec_of_test_frames ' in 'FPS_LEVEL ' and in the 'REAL_SCENES' sections.

 

Note 2:

General_corrective_factor, General_corrective_addon, Compression_corrective_factor, Compression_corrective_addon are used for fast correcting the pattern or a compression type without change of other data. By changing values of these fields you can change the frame size for all or for certain compression types.

 

Note 3:

Any pattern can contain results of traffic measurement for several real scenes with their names. Equal number of scenes should be described in the section REAL_SCENES sections of each compression type. Names of the scenes will be accessible in the drop-down list of the Scene>Name field. It is recommended to save examples of scenes as a video files.

 

Note 4:

Each level of compression ('COMPRESSION_LEVEL' ') can contain results of traffic measurement for one or several frame rates  ('FPS_LEVEL ').

 

For frame-by-frame algorithms (Motion JPEG) the frame size does not depend on the frame rate and the traffic is proportional to the frame rate, therefore it is enough to specify only one traffic value at any frame rate (specify this frame rate in the field ''Fps= '). In this case only one FPS_LEVEL section is enough.

 

For interframe algorithms (MPEG, H.264) the frame size depends on the frame rate and the traffic is not proportional to the frame rate, therefore it is necessary to specify several values of the traffic at different frame rates (specify these frame rates in the fields ' 'Fps= '). The number of the FPS_LEVEL sections should be equal to the number of traffic values at different frame rates. It is not obligatory to make tens measurements. It is enough to make 5-6 measurements, for example at 1,5,10,15,20,25fps. For intermediate values fps, The Calculator will calculate intermediate values of the traffic.

 

Note 5:

During calculation of the frame size, the CCTV Calculator assumes that the frame size is proportional to number of pixels. But in practice this rule is not always correct. Often happens so, that with the same scene, as a result of increasing the number of pixels of image, the frame size grows in a lesser degree. It could be caused by limited lens resolution, possible errors of focusing and features of digital image processing.

 

Correcting factors (PIXEL_COUNT_FACTORS) allow to take into account this disproportion.

For example,  traffic in fields ' Average_bytes_per_sec_of_test_frames ', obtained for the frame size 640*480=307200 pixels makes 100kbit/sec. The image of 1280*960=1228800 contains four times more pixels and the traffic should make 400kbit/sec. But measurements show only 200kbit/sec. To take into account this effect, it is necessary to fill a string ' 1228800 0.5 '. Here 0.5 - the correcting factor for 1228800 pixels.

There must be exact 10 lines. For intermediate numbers of pixels the CCTV Calculator will calculate intermediate values of the traffic. If factors are not used, they should be equal 1.0.

 

Note 6:

Scene_compexity_factor determines sensitivity of the frame size to complexity of the scene. To get its value it is necessary to measure the traffic for the most complex scene (with many small details) and the most simple scene. And then to divide the traffic of the complex scene to the traffic of the simple scene. It is recommended to save examples of the used scenes as video files.

Scene_activity_factor determines sensitivity of the frame size to activity of the scene.

To get its value it is necessary to measure the traffic for a scene with big area and hight speed of changes and a static scene with the same complexity.

And then to divide the traffic of the active scene to the traffic of the static scene. It is recommended to save examples of scenes as video files.

The frame size of frame-by-frame compressions (Motion JPEG) does not depend on scene activity, therefore Scene activity factor=1.

 

The obtained range of the frame size depending on complexity and activity of a scene will be divided into 5 levels. As a result of choosing complexity and activity in the Scene>Complexity and the Scene>Activity fields the factors values will be chosen from this range.

 

Hierarchical structure of the default.xml pattern file in the XML Editor