Code Monkey home page Code Monkey logo

Comments (3)

Neutree avatar Neutree commented on May 28, 2024
import sensor
import image
import lcd
import time

BACKGROUND_COLOR = (61, 84, -8, 25, -12, 11)

# Init LCD
lcd.init()
# Init Sensor
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
# resolution: 320 * 240
sensor.set_framesize(sensor.QVGA)
sensor.run(1)

while True:
    img=sensor.snapshot()
    img_gray = img.to_grayscale(copy=True)
    img.binary([BACKGROUND_COLOR])
    lcd.display(img_gray)

from maixpy-v1.

Neutree avatar Neutree commented on May 28, 2024

missing 1 required positional arguments means need one positional arg, not keyword

from maixpy-v1.

Ali1flayyih avatar Ali1flayyih commented on May 28, 2024

#try this code:

import sensor, image, time

sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()

BACKGROUND_COLOR = (61, 84, -8, 25, -12, 11)

while True:
clock.tick()
img = sensor.snapshot()
mask_red_oragne = img.binary([BACKGROUND_COLOR]).erode(1).to_bitmap(copy=True)
print("FPS %f" % clock.fps())

from maixpy-v1.

Related Issues (20)

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.