Giter Site home page Giter Site logo

sce2-sdk's People

Contributors

lukse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sce2-sdk's Issues

Focus distance measure for lens L085

From config.yaml

  L085:
    debug_keypoints: []
    description: 25x 5.3-130mm 1/2.7"
    filter1:
      name: IR CUT
      state_off: G90 G1 A1.5 F1
      state_on: G90 G1 A0 F1
    iris:
      close: M114 P0
      open: M114 P1
    lens_sku: L085-MZFD-5.3Z130-DIRECT
    limit_sensor:
      led_off: M120 P0
      led_on: M120 P1
    motor:
      curves:
        focal_range:
          x: [-19 : 11.74]
          y: [5.27 : 143.98]
    specs:
      focal_length_max: 130
      focal_length_min: 5.3
      image_circle: 6.8
      lpm: 250

Lens L085.
Could you give me a hint, what are -19 and 11.74 mean ? is it min and max positions of the zoom lens in millimeters ? In this case
why do we have negative values (-19 ) and what zero position means ? If I understand correct, -19 corresponds to 5.27 (which is very close to min focus distance 5.3 from specs), but what is 143.98 ? there is 130 mm max focus length in specs.
And there is the similar question about focus group, are y_axis values on the diagram in millimeters and what is zero ?
Maybe you could recommend any literature for this topic ?

How to control aperture?

Hello,

I am using the L084 lens. Is it possible to control the aperture of this camera to different stops? I can control the zoom fine but the have not been able to change aperture size. My code is below, I change the zoom based on keyboard inputs and would like to control the aperture as well.

import sys
import tty
import termios
import os
import grbl_utils 
import serial
import time

ser = serial.Serial('/dev/ttyACM1')
# ser.port = '/dev/ttyACM0'              # Controller com port
ser.baudrate = 115200           # Baud rate when connected over CDC USB is not important
ser.timeout = 10                # max timeout to wait for command response

ser.close()
ser.open()
ser.flushInput()
ser.flushOutput()

# Read controller version strings
# ver = grbl_utils.send_command(ser, "$I", expecting_lines=3)
# grbl_utils.parse_version(ver[0])
# grbl_utils.parse_adc(ver[1])

# Switch to ABS positionig mode
grbl_utils.send_command(ser, "G90")


# Limit sensor LED ON
# In IR mode should be switched off because of beeding light to sensor
grbl_utils.send_command(ser, "M120 P1")


# IRIS open
grbl_utils.send_command(ser, "M114 P1")


# IR CUT filter 
grbl_utils.send_command(ser, "G90 G1 A0.3 F1")    # ON (Visible light)
#grbl_utils.send_command(ser, "G90 G1 A0.7 F1")  # OFF (Full spectrum)

focus = 0.0
iris = 0.0
keys = ['q', 'w', 'a', 's']
while True:
    # Read character from C++ pipe
    key = sys.stdin.readline()
    if not key:
        break

    key = key[0]

    # adjust focus
    if key == keys[0]:
        focus -= .05
    if key == keys[1]:
        focus += .05

    # adjust iris
    if key == keys[2]:
        iris -= 1
    if key == keys[3]:
        iris += 1

    print("focus:" + str(focus) + " | iris:" + str(iris))
    
    cmd = "G90 G1 X0.0 Y0.0 Z" + str(focus) + " F1000"
    grbl_utils.send_command(ser, cmd)
    grbl_utils.wait_for_idle(ser, echo=False)

# # # # home motors
grbl_utils.send_command(ser, "$HX") 
grbl_utils.send_command(ser, "$HY") 
grbl_utils.send_command(ser, "$HZ") 

# Read GRBL status
status_txt = grbl_utils.read_status(ser)
status = grbl_utils.parse_status(status_txt, print_debug=True)
print("done")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.