Replacement of cv::imencode - opencv

I wonder if there is some replacement of cv::imencode function without a need of OpenCV. I'd like to have that still under python.
Can please advice how to replace it without using OpenCV?
Thank you.

Perhaps you can take a look on my https://github.com/lilohuang/PyTurboJPEG which is a Python wrapper of libjpeg-turbo for decoding and encoding JPEG image without using OpenCV.

Related

Image processing and Computer Vision

I would like to use Smalltalk (Pharo) to better refactor my image processing and computer vision code/algorithms, written in other languages. I have not found a lot of examples online where Smalltalk is used for processing images (or video frames). I would like to know whether
i) there is an opencv/image/computer vision library available for Smalltalk that is easily installed or
ii) someone could give an example of how to access the pixel data in an image and threshold it using Smalltalk.
For the first question, you can maybe write your own interface using FFI to the OpenCV C-API.
For the second question, I think it's easy to use ImageReadWriter formFromFileNamed: and then can use pixelValueAt: to read the value, threshold, and then write back by pixelValueAt:put:.
There is a recent binding to OpenCV (for Pharo 7 a.t.m.) at https://github.com/feenkcom/gt4opencv

Skeletonization in opencv

Is there any specific function that can be used in opencv for skeletonization? Besides, i searched for some time and want to know if opencv implements voronoi-skeleton (seems like there is but is it really are)?
It looks like Voronoi-Skeleton is implemented in the _cvConstructSkeleton() and _cvLee() functions in opencv/src/cvaux/cvlee.cpp.
I haven't seen any official documentation about how to use this functionality in OpenCV. Since cvlee.cpp is in the cvaux folder, I think these may be experimental OpenCV functions.

Streaming opencv Video

I need some ideas about how to stream video feed coming from opencv to a webpage. I currently have gStreamer, but I don't know if this is the right tool for the job. Any advice on using gStreamer or any hyperlinks to tutorials would be helpful and appreciated!
Thanks!
OpenCV doesn't provide an interface for streaming video, which means that you'll need to use some other techonology for this purpose.
I've used GStreamer in several professional projects: this is the droid you are looking for.
I do not have any experience w/ streaming OpenCV output to a website. However I'm sure this is possible using gstreamer.
Using a gstreamer stream, it is possible to get data and convert the data in to OpenCV format. I recommend you read up on GstAppSink and GstBuffer.
Basically, if I remember correctly, you must run a pipeline in the a background thread. Then using some function in gst_app_sink, you can get the buffer data from the sink.
A quick lookup on the issue, you had to use GST_BUFFER_DATA for this
I remember having to convert the result from yCBCr to bgr, a collegue had problems as the conversion of opencv was inadequate. So you might have to write your own. (This was back in the IplImage* days)

Recognizing text from a picture in delphi

i need an advice on how to approach this problem. I have some picture data: *.jpg, *.bmp ... and i need to extract the data from it. The data is alphanumeric text. I work in delphi.
You will have to head for a OCR (Optical Character Recognition) library. This is a pretty complex procedure, I believe you wouldn't be asking this question if you knew any way to implement this by yourself.
A quick Google yielded this result, maybe it's of help for you:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1623&lngWId=7
Look here:
https://forums.embarcadero.com/message.jspa?messageID=29331
Take a look at my answer about NeuroVCL OCR here. There is a lot of useful info and sample Delphi OCR DCU components.

Automatic image rotation based on a logo

We're looking for a package to help identify and automatically rotate faxed TIFF images based on a watermark or logo.
We use libtiff for rotation currently, but don't know of any other libraries or packages I can use for detecting this logo and determining how to rotate the images.
I have done some basic work with OpenCV but I'm not sure that it is the right tool for this job. I would prefer to use C/C++ but Java, Perl or PHP would be acceptable too.
You are in the right place using OpenCV, it is an excellent utility. For example, this guy used it for template matching, which is fairly similar to what you need to do. Also, the link Roddy specified looks similar to what you want to do.
I feel that OpenCV is the best library out there for this kind of development.
#Brian, OpenCV and the IntelIPP are closely linked and very similar (both Intel libs). As far as I know, if OpenCV finds the intel IPP on your computer it will automatically use it under the hood for improved speed.
The Intel Performance Primitives (IPP) library has a lot of very efficient algorithms that help with this kind of a task. The library is callable from C/C++ and we have found it to be very fast. I should also note that it's not limited to just Intel hardware.
That's quite a complex and specialized algorithm that you need.
Have a look at http://en.wikipedia.org/wiki/Template_matching. There's also a demo program (but no source) at http://www.lps.usp.br/~hae/software/cirateg/index.html
Obviously these require you to know the logo you are looking for in advance...

Resources