anchor.diff:  By default MATLAB image matrices convert to `byte[height][width][channels]` Java arrays. However, when converting back to MATLAB there are some additional problems:
   
   * `byte` gets converted to `int8` instead of `uint8`, resulting in an invalid image matrix
  -* changing the type back to `uint8` gets somewhat messy because the `uint8(matrix)` cast would set all negative values to zero, and the alternative `typecast(matrix, 'uint8')` only works on vectors
  -
  -Thus, converting the data to a valid image matrix still required several operations.
  +* changing the type back to `uint8` is somewhat messy because the `uint8(matrix)` cast sets all negative values to zero, and the alternative `typecast(matrix, 'uint8')` only works on vectors
  +
  +Thus, converting the data to a valid image matrix still requires several operations.
   
   [source,matlab]
   ----
  
positive.code: 
  *4. MATLAB Layout as 1D Pixel Array*
  
  This approach also copies a pixel array, but this time the pixels are already stored as in the MATLAB convention.
  
  [source,matlab]
  ----
  
negative.code: The results show that the default conversion as well as jpeg compression are essentially non-starters for color images. For grayscale images the default conversion works significantly better due to the fact that the data is stored in a much more efficient 2D array (`byte[height][width]`), and that there is no need to re-order pixels by color.
  
  [NOTE]
  Unfortunately, we currently don't have a good explanation for the ~10x cost increase (rather than ~4x) between 1080p and 4K grayscale. The behavior was the same across computers and different memory settings.
  
  When copying the pixels of a Java image we can see another significant performance increase due to the data being stored in a single contiguous array. At this point much of the overhead comes from re-ordering pixels, so by doing the conversion beforehand we can get another 2-3x improvement.
  
  Lastly, although accessing shared memory in combination with the locking overhead results in a slightly higher fixed cost, the copying itself is significantly cheaper, resulting in another 2-3x speedup for high resolution images. Overall, going through shared memory scales very well and would even allow streaming of 4K color images from two cameras simultaneously.
  
  == Final Notes
  
  