Are there any open source APIs out there can can remove a background from an image automatically as soon as a photo is taken?
To remove the background from an image you need an image processing or computer vision library.
OpenCV offers a lot of functionality to manipulate images and offers libraries for iOS and Android.
Here is an example of how a background subtraction can be achieved.
There are also other possibilities to achieve this.
For iOS i found an example using Quartz2D (Masking an Image with Color):
https://developer.apple.com/library/ios/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_images/dq_images.html
and for Android:
https://xjaphx.wordpress.com/2011/09/28/image-processing-pixel-color-replacement/
Remove.bg Seems to work really well. For free you can get 50 calls per months, you have to pay if you want more.
There is this program, https://github.com/nadermx/backgroundremover which is free and open source, and you can install via pip
pip install --upgrade pip
pip install backgroundremover
Then just script it to do
backgroundremover -i "/path/to/image.jpeg" -o "output.png"
source: author of the project
Related
I'm trying to add QtVirtualKeyboard to my standalone application. My app running without desktop but i don't think this is the problem. I found that we can integrate to my QMainWindow a QObject that show the keyboard along my app. I also found that it possible to use QQuickView and inputPanel, but sincerely, im not sure how to make it. Anyone can help?
To make it "works" i used this topic Install QtVirtualkeyboard in raspberry-pi? then i have installed QtVirtualKeyboard with this commandsudo apt install qtvirtualkeyboard-plugin. I said "work" because if i didn't install with apt, my application did nothing.
I am attempting to plot fields from a GRIB2 file of GFS model data (example file: https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20220202/12/atmos/gfs.t12z.pgrb2.0p25.f006 ). Normally I would just use PyGRIB and I'd have this problem solved yesterday, but I am on Windows (because it's what my employer uses, so I'm stuck with it and have to make this work on a Windows environment) and Windows and PyGRIB don't play nice. I am able to open the GRIB2 file and even plot variables over the entire domain using GDAL. The only problem is I need a way to get an array of the latitude and longitude values at each grid point (similar to in PyGRIB doing .latlons() on a GRIB message) so I can plot a subset of the domain.
Basically, I'm trying to replicate what is being done in this video, and need the data (got it using dataset.GetRasterBand(269).ReadAsArray()), then the lat/lon information.
I also tried using xarray, but Windows doesn't play nice with xarray either.
Given your comfort with PyGRIB, I'd say the solution is to use Conda and install it on Windows. You can use conda-forge's miniforge to install conda. Then, however you get Conda, install pygrib with:
conda install -c conda-forge pygrib
during the installation of rasa with anaconda in the prompt (look at the img) enter image description hereit download many and meny version of tensorflow is that normal ?
Yep that is totally normal to install those versions. Also yes the time does vary from system to system.
More and more I'm seeing apis or plugins pages with animated gifs, for example the atom packages seem to do that a lot.
See https://atom.io/packages/terminal-status or https://atom.io/packages/mocha-test-runner)
So what tools and workflow is being used to create this animated gifs? (last time I tried it, was quite an heavy process)
I found the answer in the Atom Discuss list What gif creator is atom team using?
They seem to use http://www.cockos.com/licecap
Peek is a simple Linux alternative.
sudo add-apt-repository ppa:peek-developers/stable
sudo apt update
sudo apt install peek
I'm using Tess4J (JNA wrapper around tesseract), and trying to call tess.doOCR(myFile) to OCR text from a single-page PDF.
I have GhostScript installed (by using yum install ghostscript), gs -h works correctly.
My app server is using 64-bit JVM, and I have gsdll64.dll, and the 64-bit tesseract dll's liblept168.dll and libtesseract302.dll in the class path.
When tess.doOCR(myFile) is called, this is logged:
GPL Ghostscript 8.70 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
But then it just stops there. The program doesn't go any further.
UPDATE --
It looks like the real issue is from this error:
java.lang.UnsatisfiedLinkError: Unable to load library 'tesseract': Native library (linux-x86-64/libtesseract.so) not found in resource path
After looking around a lot, I don't see a convenient place to find this libtesseract.so file, and I'm not sure what it takes to get this onto my Linux app server. I read that maybe I need to download some C++ runtime, but I don't see a Linux download for that. Any advice would be much appreciated.
Or is this something to do with a symbolic link?
The Fix was simple for me,just do sudo apt-get install tesseract-ocr from the command line. For linux you dont need to worry about the DDL librarires or the jvm version. Installing tessearct from apt-get will do the trick.
Those DLLs are for Windows. For Linux, you'll need to install or build from Tesseract source.
That GS version, 8.70, is quite old. The latest Ghost4J library that Tess4J uses is not compatible with that.
Tess4J should include required libraries. However, you need to extract them first.
This should do the trick:
File tmpFolder = LoadLibs.extractTessResources("win32-x86-64"); // replace platform
System.setProperty("java.library.path", tmpFolder.getPath());
You should replace the argument of extractTessResources(..) with your platform. You can find possible options by looking into the Tess4J jar file.
This way you need not to install Tesseract on your system.
Recently I wrote a blog post about Tess4J in which I used this technique. Maybe it can help if you need further information or a running example project.
sudo apt-get update
sudo apt-get install tesseract-ocr
download test data by git
https://github.com/tesseract-ocr/tessdata