element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Pi camera Python3 interface issues
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 2 replies
  • Subscribers 665 subscribers
  • Views 470 views
  • Users 0 members are here
  • pi_camera
  • raspberry_pi
Related

Pi camera Python3 interface issues

plmsherman
plmsherman over 10 years ago

I'm working on a project that uses a Pi camera that needs to be controlled through Python because I can't use auto exposure. The camera is working and creating images but there's three problems I've encountered that I can't resolve. All of the problems are dependent on a single function call of the camera setup

1. There's no preview image

2. Image capture takes almost 30 seconds

3. The zoom() function is disabled - I'd like to have this but it isn't a necessity

 

All of these problems appear to be results associated with the camera.framerate() call. If I remove it from the command set, the camera functions normally, with a preview screen and the image capture takes a fraction of a second. The zoom() function also works normally. With the framerate() call in the command set, there's no preview but there's a very short duration image on the display as the image is taken. Unfortunately, without the framerate() call, the exposure time is limited to 33ms. It also appears that almost all of the 30 second delay starts when the capture() call is issued and ends when the image appears on the screen.

 

I'm open to any suggestions as to how I can eliminate the long delay. Getting a preview image would be nice but isn't a necessity for this application.

 

Phil

 

Python camera control code:

 

with picamera.PiCamera() as camera:

    camera.resolution = (2582,1944)

    camera.framerate = Fraction(1,6)

#    camera.zoom = (0.25,0.25, 0.25,0.25)

    camera.shutter_speed =190000

    camera.iso = 800

    camera.start_preview()

    time.sleep(5)

    camera.capture(my_file)

  • Sign in to reply
  • Cancel
  • clem57
    0 clem57 over 10 years ago

    I am willing to bet the issue is in the camera object code. Have you taken a look inside?

    Clem

    Edit:

    Please open an "Issue"  at https://github.com/waveform80/picamera for the developer. Add as much details as you can so that it can be resolved quickly.

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • plmsherman
    0 plmsherman over 10 years ago in reply to clem57

    I'd like to but I'm getting under time pressure to complete the software I'm writing and won't have time to examine it. I expect to need at least another 100 hours to tie all pieces that are finished together then develop a GUI user interface for it.

     

    I'll take your recommendation and open an issue at github. Thanks for the reference to it.

     

     

    Phil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube