anchor.diff:  
   *5. MATLAB Layout as Shared Memory*
   
  -This approach is the same as 4. with the difference being that the data is read from shared memory using link:https://mathworks.com/help/matlab/ref/memmapfile.html[memmapfile], thus bypassing the Java translation layer entirely. Shared memory is typically used for inter-process communication, but it can also be used within a single process. Running it in the same process also simplifies synchronization since we can use standard Java locks.
  +This approach is the same as 4. with the difference being that the data is exchanged through shared memory using link:https://mathworks.com/help/matlab/ref/memmapfile.html[memmapfile], thus bypassing the Java translation layer entirely. Shared memory is typically used for inter-process communication, but it can also be used within a single process. Running it in the same process also simplifies synchronization since we can use standard Java locks.
   
   [source,matlab]
   ----
  
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: 
  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, 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.
  