anchor.diff:  
   Copying the raw pixels from a Java image is significantly faster, but there is still too much overhead caused by the need to change the memory layout.
   
  -The by far best option is to convert the layout outside of MATLAB and if possible bypass the Java translation layer entirely by using shared memory. This approach scales very well and can transfer even 4K images in real-time.
  +The by far best option is to convert the layout outside of MATLAB and, if possible, to bypass the Java translation layer by using shared memory. This approach scales very well and can transfer even 4K images in real-time.
   
   [NOTE]
   Note that we typically use lower resolution images (e.g. 480p) to speed up the processing. We only use higher resolution images when we use MATLAB as a live video display.
  
positive.code: 
  *3. Java Layout as 1D Pixel Array*
  
  The most common approach for getting image data is to copy the backing array of Java's `BufferedImage` class and to reshape the memory using MATLAB (compare this link:https://mathworks.com/matlabcentral/answers/100155-how-can-i-convert-a-java-image-object-into-a-matlab-image-matrix#answer_109503[answer]).
  
  [source,matlab]
  ----
  
negative.code: 
  In order to process images at a frame rate of 30 fps in real-time, the total time budget of the main MATLAB thread is 33ms per cycle. Thus, the overhead incurred on the main thread caused by the acquisition needs to be sufficiently low, i.e., a low number of milliseconds, to leave enough time for actual processing.
  
  While the automated translation from and to Java types tends to be sufficient for most applications, it is very inefficient for large and multi dimensional matrices. For example, a `1080x1920x3` MATLAB image matrix gets translated to a `byte[1080][1920][3]` Java array. This means that there is a separate array object for every single pixel in the image.
  
  As an additional complication, Java uses a different memory layout than MATLAB. While Java stores image data in row-major order, MATLAB stores images transposed and in column-major order. For example, if the pixel data for a Java image would be laid out as `[RGB][RGB][RGB]...`, the same image would be laid out as `[RRR...][GGG...][BBB...]` in MATLAB.  (`R`, `G`, `B` correspond to red, green, and blue values for one pixel)
  
  