question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues when testing 1.13 new features (The MMAL Tour in the doc)

See original GitHub issue

Hello all and well done for the work on picamera.

This library will be very useful on a project I am working on, especially the new features 1.13 version is adding. I’d like to add some information drawn over a record, so I’m triing to make the examples of “The MMAL Tour” working. The first samples are working well, but when it arrives to what I want, I have some problems to make them work.

For example, I tested the 16.1.11 Python Components example which can be summarized by :

from picamera import mmal, mmalobj as mo
from picamera import array

camera = mo.MMALCamera()
preview = mo.MMALRenderer()

class Crosshair(array.PiArrayTransform):
  def transform(self, source, target):
    with source as sdata, target as tdata:
      tdata[...] = sdata
      tdata[240, :, :] = 0xff
      tdata[:, 320, :] = 0xff
    return False

transform = Crosshair()

camera.outputs[0].framesize = (640, 480)
camera.outputs[0].framerate = 30
camera.outputs[0].commit()

transform.connect(camera.outputs[0])
preview.connect(transform)
transform.connection.enable()
preview.connection.enable()
transform.enable()

and this code doesn’t do anything. What am I doing wrong ? What do I forget ? I tried to eliminate some commands in the previous chapters to keep only the ones that should be necessary for the example …

16.1.9 example didn’t work either, but it seemed to be more complicated that this one.

By the way, I have pointed out some misprint in the doc, where can I spot them ?

Thanks for all 😃

Jean-Rodolphe Letertre

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
waveform80commented, Oct 24, 2017

Apologies I haven’t got time to work on this at the moment (it’s going to be at least another month before I get free time for picamera again). For anyone wanting to play with older versions:

  1. Learn about virtualenvs. There’s the virtualenv user guide or pipenv guide or probably plenty of others. Anyway, learn it, get comfortable with it.

  2. Once you’re in a venv you can pip install any version of picamera at all; I never delete old versions from PyPI so everything back to 0.3 (the first version released on PyPI) is still available. Just do pip install picamera==1.12 (or whatever version you fancy).

  3. You can also git clone this repository and hack on the code yourself within a venv (there’s development instructions in the documentation).

1reaction
waveform80commented, Jul 8, 2017

Sadly I haven’t got much time to look into this, but I can confirm the issue and the proposed workaround by @JimKnowler. Unfortunately that doesn’t help much: read the commit message and you’ll see that reverting that commit just breaks #311 again. There’s obviously something about MMAL’s output buffer handling that I’m not understanding (and hence which goes wrong when the Python-side of the mmalobj components are used). Unfortunately, the pure Python components in mmalobj are of extremely niche interest compared to having capture_continuous work properly so until I/someone can come up with a “proper” fix things will have to stay as they are.

That said, if you’re playing around with mmalobj, I expect you’re more than capable of reverting a commit so I don’t feel too guilty 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Picamera 1.13 Documentation - Read the Docs
This firmware lags behind the official firmware and at the time of writing lacks several features including long exposures and text overlays. 2 ......
Read more >
PDF - Picamera 1.13 Documentation
Whilst the picamera library attempts to maintain backward compatibility with older Pi firmwares, it is only tested against the latest firmware ...
Read more >
1.13.4 crashes on Android · Issue #111 · twitter/twitter-text · GitHub
Seems Regex pattern is too long. The text was updated successfully, but these errors were encountered: ...
Read more >
Introduction to Software Testing.pdf - CSE
An instructor's solution manual, PowerPoint slides, sample syllabi, additional examples and up- dates, testing tools for students, and example software programs ...
Read more >
Sheet1 - College of Diplomates
The teeth were obt at the following visit, with another bacteriological test taken ... Physical and chemical properties of a new root end...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found