Answers.Body: <p>The image is scanned (and data stored) with an imaginary cursor starting at the upper left, working across horizontally to the right, then the cursor pauses to move down one line and resetting to left edge. One could think of the rectangular image as a single string where the "carriage return - line feed" is merely implied by keeping track of the timing (or counting pixels). In most image storage formats, the width and height are tags in the header and the data itself is a long stream without demarcated frame extents. Since the figures speak about clocks and blanking however, file storage is probably not implicated here.</p>
  
  <p><em>I think</em> that the horizontal scan lines can be skipped (or at least started and then reset arbitrarily), but cannot be started at an arbitrary distance from the left edge.</p>
  
  <p>Selection 1, is optimal for this behavior: you send a minimal set of commands to skip down to the proper horizontal position, and scanning can start at the upper left <strong>of the desired viewport</strong> scan what is desired and then skip the rest.</p>
  
  <p>In Selection 2, we must scan every single line to at least the rightward extent of the part we are interested in, at which time we can send a command to move to the next line and reset.</p>
  
  <p>Very roughly: if you have a 99w x 99h "units", and are interested in 1/3 of the image centered as in the examples, in selection 1, you scan 99w x 33h units while in selection 2, you must scan 66w x 99h units minimum. It is unclear to me, but the supporting figure looks to me to be speaking about selection 2 only, and the horizontal "2,592clk 1H" implies to me that the right-side mask is skipped for scanning.</p>
  
  <p>Note that if the camera cannot start a horizontal line without scanning the complete line (i.e. can't stop and reset at an arbitrary distance from the left edge), then the selection 2 scenario must scan 99w x 99h units.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-07-16T21:47:52.957Z
Answers.LastActivityDate: 2013-07-16T21:47:52.957Z
Answers.UserDisplayName: horatio
Answers.Body: <p>Here's what I <em>think</em> is going on.</p>
  
  <p>In the example above, with the "A", let's assume that all white space takes up very little information in the data stream when being transferred from the camera, and that the "A" itself takes considerably more space (similar to how, in a JPEG, an image with lots of solid color will be smaller than an image with lots of contrast). In this case, looking at ROI 1, you are cutting out parts of the "A", meaning parts of the image that would be costly to transfer are being left out. This means that the resulting stream will be considerably smaller. In ROI 2, the only parts being cut out are white parts that would be very cheap to transfer anyway, thus making it inefficient.</p>
  
  <p>Looking at the two diagrams, the first one seems to illustrate RIO 1. Notice that the video output here seems to measure 2,448 CLK. In the upper right we see that 1 CLK = 12.22 nanoseconds. Doing the math, that comes out to the video output taking 29.91456 microseconds. Meanwhile, in the second diagram, we have what appears to be an illustration of RIO 2. Here, video output is measured at 2,058 H, with 1 H being 31.68 microseconds. That comes out to 65.19744 milliseconds, considerable longer than 30 microseconds.</p>
  
  <p>I'll admit the diagrams are strange, but really they just seem to be an overly-complicated way of saying that RIO 1 leaves less hard-to-transfer parts of the image than RIO 2 (which leaves all of it).</p>
  
  <p>That's my guess.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-07-15T06:42:02.907Z
Answers.LastActivityDate: 2013-07-15T06:42:02.907Z
Answers.UserDisplayName: Tortilla
Body: <p>I want to understand how ROI selection actually happens inside a camera? I have an ethernet camera, that can capture and send images to the PC, based on user defined ROI. The advantage of this is that I transfer only useful/relevant data from the image to my PC which will process it, instead of processing on the complete image.  </p>
  
  <p>The manufacturer has given a user guide, that gives very little details. The user guide says that ROI Selection-1(see figure below) is a valid ROI, and the ROI Selection-2 is of no use, in the sense that it will be still sending the complete image (though with some 0 values or garbage). That is the ROI selection-2 will not give any advantage of having only useful data transfer.<br>
    <img src="https://i.sstatic.net/4DAXx.jpg" alt="enter image description here"></p>
  
  <p>In support of his arguments he has given the following figure(without any explanation)</p>
  
  <p><strong>Horizontal scanning</strong>
  <img src="https://i.sstatic.net/3yM4j.jpg" alt="enter image description here"></p>
  
  <p><strong>Vertical scanning</strong><br>
  <img src="https://i.sstatic.net/r5KUg.jpg" alt="enter image description here"></p>
  
  <p>Can someone help me understand why the selection 2 is invalid. I am really facing problem in understanding these pulses. Is there any link giving details about these pulses?  </p>
  
Tags: <video><camera>
Title: Understanding Region of Interest selection in a Camera
UserDisplayName: gpuguy
ThreadText: # Understanding Region of Interest selection in a Camera
  
  (Asked by: username_0 on 2012-07-13)
  
  I want to understand how ROI selection actually happens inside a camera? I have an ethernet camera, that can capture and send images to the PC, based on user defined ROI. The advantage of this is that I transfer only useful/relevant data from the image to my PC which will process it, instead of processing on the complete image.
  
  The manufacturer has given a user guide, that gives very little details. The user guide says that ROI Selection-1(see figure below) is a valid ROI, and the ROI Selection-2 is of no use, in the sense that it will be still sending the complete image (though with some 0 values or garbage). That is the ROI selection-2 will not give any advantage of having only useful data transfer.  
  ![enter image description here](https://i.sstatic.net/4DAXx.jpg)
  
  In support of his arguments he has given the following figure(without any explanation)
  
  **Horizontal scanning**
  ![enter image description here](https://i.sstatic.net/3yM4j.jpg)
  
  **Vertical scanning**  
  ![enter image description here](https://i.sstatic.net/r5KUg.jpg)
  
  Can someone help me understand why the selection 2 is invalid. I am really facing problem in understanding these pulses. Is there any link giving details about these pulses?
  
  **Tags:** video, camera
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2013-07-16. Score: 1
  
  The image is scanned (and data stored) with an imaginary cursor starting at the upper left, working across horizontally to the right, then the cursor pauses to move down one line and resetting to left edge. One could think of the rectangular image as a single string where the "carriage return - line feed" is merely implied by keeping track of the timing (or counting pixels). In most image storage formats, the width and height are tags in the header and the data itself is a long stream without demarcated frame extents. Since the figures speak about clocks and blanking however, file storage is probably not implicated here.
  
  *I think* that the horizontal scan lines can be skipped (or at least started and then reset arbitrarily), but cannot be started at an arbitrary distance from the left edge.
  
  Selection 1, is optimal for this behavior: you send a minimal set of commands to skip down to the proper horizontal position, and scanning can start at the upper left **of the desired viewport** scan what is desired and then skip the rest.
  
  In Selection 2, we must scan every single line to at least the rightward extent of the part we are interested in, at which time we can send a command to move to the next line and reset.
  
  Very roughly: if you have a 99w x 99h "units", and are interested in 1/3 of the image centered as in the examples, in selection 1, you scan 99w x 33h units while in selection 2, you must scan 66w x 99h units minimum. It is unclear to me, but the supporting figure looks to me to be speaking about selection 2 only, and the horizontal "2,592clk 1H" implies to me that the right-side mask is skipped for scanning.
  
  Note that if the camera cannot start a horizontal line without scanning the complete line (i.e. can't stop and reset at an arbitrary distance from the left edge), then the selection 2 scenario must scan 99w x 99h units.
  
  
  ---
  
  ### Answer by username_2 on 2013-07-15. Score: 0
  
  Here's what I *think* is going on.
  
  In the example above, with the "A", let's assume that all white space takes up very little information in the data stream when being transferred from the camera, and that the "A" itself takes considerably more space (similar to how, in a JPEG, an image with lots of solid color will be smaller than an image with lots of contrast). In this case, looking at ROI 1, you are cutting out parts of the "A", meaning parts of the image that would be costly to transfer are being left out. This means that the resulting stream will be considerably smaller. In ROI 2, the only parts being cut out are white parts that would be very cheap to transfer anyway, thus making it inefficient.
  
  Looking at the two diagrams, the first one seems to illustrate RIO 1. Notice that the video output here seems to measure 2,448 CLK. In the upper right we see that 1 CLK = 12.22 nanoseconds. Doing the math, that comes out to the video output taking 29.91456 microseconds. Meanwhile, in the second diagram, we have what appears to be an illustration of RIO 2. Here, video output is measured at 2,058 H, with 1 H being 31.68 microseconds. That comes out to 65.19744 milliseconds, considerable longer than 30 microseconds.
  
  I'll admit the diagrams are strange, but really they just seem to be an overly-complicated way of saying that RIO 1 leaves less hard-to-transfer parts of the image than RIO 2 (which leaves all of it).
  
  That's my guess.
  
  
  ---
  
  