Is there an skimage alternative to OpenCV's ArUco library? - python

I have used OpenCV in the past for a project of mine, and I remember the AruCo library being very useful to specify certain regions, to calibrate the camera, etc.
I am currently working on another project that will get involved with image processing, and I've been working with SciPy in general for data-related tasks. As I will be using SciPy, I've been considering to work with skimage, as it may be more related to the other packages I will use.
Here's the question: I want to use something similar to, if not the same as, the AruCo library for skimage as it will be convenient to work with. Is there such a solution for skimage?
Here's the library in question,
AruCo library for OpenCV

After some digging around, I've noticed that OpenCV and skimage are compatible with each other to a great extent. The only issue I've encountered so far is with io.imshow() and cv2.imshow() yielding negative-like colors with respect to each other (in Colab, that is).
If that (and other potential minor issues) could be resolved, it is quite easy to just use AruCo with cv2 and use skimage wherever needed. It could take some work, but it is possible.
Here's a great example from the skimage library itself, where the library cv is used to capture webcam feeds. So they are actually compatible.
Note: This is deprecated, so just consider it as a proof. There may be better solutions to use a webcam feed than this (could just use cv2 for it)
https://gist.github.com/stefanv/5160329

Related

How to install _nd_image from SciPy

I am trying to perform Bayer demosaicing of a raw image but I need to keep library dependencies and size to the minimum. Initially, I used cv2.cvtColor() for the demosaicing part but I found colour-demosaicing library to be much lighter and did also work for me.
However, there is a dependency with Scipy's method convolve(), which calls _correlate_or_convolve(), and eventually _nd_image.correlate().
I managed to take all the code from Scipy so I don't need to install the whole library by extracting ndimage module. The problem is that _nd_image seems to be a binary or something that should be built (sorry if terminology is incorrect, I'm new on this) which I am not sure how to bring to the final device where demosaicing should happen.
Any hint is appreciated.

How to use opencv 'superres' package on Python cv2?

A simple enough question - I can't seem to find how to import or use superres from cv2 on Python, even though it is documented:
http://docs.opencv.org/2.4/modules/superres/doc/super_resolution.html
Thanks.
I guess there is no official Python API support for the superres module, However you may get some Open Source implementations of the same algorithm from: SeRanet Github or Python superresolution module

Capturing images from a camera in Python: easy, reliable, cross-platform

What is the most suitable way to capture a still image from Python and convert to a PIL image?
Google gives me numerous ways with OpenCV and lesser-known libraries. I want an easy, reliable, mature, cross-platform library for this purpose. And with minimal dependencies and extra packages.
If possible, it must also support displaying live images with major windowing toolkits, although the performance (frame rate, clarity) is not important.
I use gphoto2 and with subprocess. But it should be possible to access this library from ctypes, if you prefer this.
OpenCV's Python API is pretty solid at this point, and OpenCV is easily installed on all major platforms. It's good, and it's probably your best bet. Getting a live feed from a webcam can be done in as little as 10 lines of code.
PIL or its newer fork Pillow are also good, mature, and cross platform.
PyGame also has a camera module, an intro is here: http://www.pygame.org/docs/tut/camera/CameraIntro.html but I have noticed that getting PyGame to integrate gracefully into other toolkits (wx, Qt) can be difficult.

Digital image correlation libraries for a mac

I'm working on a project to develop a Digital Image Correlation tool for measuring surface strains. Does anyone know of any Mac compatible libraries that I can use to do the DIC processing. I was thinking that this might be something where there is a Python library but I have not yet managed to find one.
Have a look at this thread Image Processing, In Python?
Then there is the OpenCV with Python interface
Don't know about the MAC-part though...

Python: default/common way to read png images

I haven't found a standard way in Python to read images. Is there really none (because there are so many functions for so many custom stuff that I really wonder that there are no functions to read images)? Or what is it? (It should be available in the MacOSX standard installation and in most recent versions on Linux distributions.)
If there is none, what is the most common lib?
Many search results hint me to Python Imaging Library. If this is some well known Python-lib for reading images, why isn't it included in Python?
No, there are no modules in the standard library for reading/writing/processing images directly. But the most common library might be PIL (Python Imaging Library). Many projects are not included in the standard library because they are 1) totally optional and 2) cannot be maintained by the few Python core developers.
Coming late to the party, I would strongly suggest one of the Python interfaces to the ImageMagick library (Wand worked well in my testing, I'll know more soon...)
ImageMagick is a more powerful library and also pretty well a de-facto standard across many languages. Appealing to a wider base, they also have a wider developer base as a result.
THe suggested PIL does not support interlaced PNGs. It can be quite anoying when dealing with lots of PNGs from different origins.
It is possible to open them, but can only read headerinformation from them, all other operations fail.

Categories