Changeset - 0440fb0f458b
[Not reviewed]
default
0 2 0
Drew Perttula - 11 years ago 2014-06-10 05:49:36
drewp@bigasterisk.com
add rotation param to vidref
Ignore-this: 3c36bede3d3f7b18e3e26d2c5b2722ef
2 files changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
bin/picamserve
Show inline comments
 
@@ -33,12 +33,13 @@ def setCameraParams(c, arg):
 
    c.exposure_mode = arg('exposure_mode', 'fixedfps')
 
    c.awb_mode = arg('awb_mode', 'off')
 
    c.brightness = int(arg('brightness', 50))
 
    c.exposure_compensation= int(arg('exposure_compensation', 0))
 
    c.awb_gains = (float(arg('redgain', 1)), float(arg('bluegain', 1)))
 
    c.ISO = int(arg('iso', 250))
 
    c.rotation = int(arg('rotation', '0'))
 

	
 
def setupCrop(c, arg):
 
    c.crop = (float(arg('x', 0)), float(arg('y', 0)),
 
              float(arg('w', 1)), float(arg('h', 1)))
 
    rw = rh = int(arg('resize', 100))
 
    # width 1920, showing w=.3 of image, resize=100 -> scale is 100/.3*1920
light9/vidref/vidref.html
Show inline comments
 
@@ -78,12 +78,20 @@
 
        <option>320</option>
 
        <option>400</option>
 
        <option>500</option>
 
        <option>640</option>
 
        <option>800</option>
 
      </datalist>
 
      <div><label>rotation
 
        <select data-bind="value: params.rotation">
 
          <option>0</option>
 
          <option>90</option>
 
          <option>180</option>
 
          <option>270</option>
 
        </select>
 
      </label></div>
 
      <div>See <a href="http://picamera.readthedocs.org/en/release-1.4/api.html#picamera.PiCamera.ISO">picamera attribute docs</a></div>
 
    </fieldset>
 

	
 
    <div>Resulting url: <a class="smallUrl" data-bind="attr: {href: currentUrl}, text: currentUrl"></a></div>
 

	
 
    <div>Resulting crop image:</div>
 
@@ -105,12 +113,13 @@
 
           awb_mode: ko.observable('auto'),
 
           brightness: ko.observable(50),
 
           redgain: ko.observable(1),
 
           bluegain: ko.observable(1),
 
           iso: ko.observable(250),
 
           exposure_compensation: ko.observable(0),
 
           rotation: ko.observable(0),
 
         }
 
       };
 
       model.currentUrl = ko.computed(assembleCamUrlWithCrop);
 

	
 
       function getBaseUrl() {
 
         $.ajax({
0 comments (0 inline, 0 general)