Code Monkey home page Code Monkey logo

cloudapi's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudapi's Issues

API does not handle EXIF orientation tag

Some phone cameras don't re-orient images before saving them, meaning that images can be saved rotated, but with metadata specifying the rotation, so that image viewing programs can display them correctly. See here for details: https://www.howtogeek.com/254830/why-your-photos-dont-always-appear-correctly-rotated/

The cloud API appears not to take the rotation metadata into account, so it will fail to identify license plates that would be found if the image were correctly rotated. I was able to fix this in my client by simply rotating the image as needed before uploading it (using sharp), but it would be nice if the API could handle this for me.

Issue in Java api

Am using java api. I get the below error.

Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 10000000000 at line 1 column 744 path $.credits_monthly_total
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:227)
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:217)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at com.openalpr.api.invoker.JSON.deserialize(JSON.java:103)
at com.openalpr.api.invoker.ApiClient.deserialize(ApiClient.java:859)
at com.openalpr.api.invoker.ApiClient.handleResponse(ApiClient.java:1062)
at com.openalpr.api.invoker.ApiClient.execute(ApiClient.java:989)
at com.openalpr.api.DefaultApi.recognizeFileWithHttpInfo(DefaultApi.java:371)
at com.openalpr.api.DefaultApi.recognizeFile(DefaultApi.java:350)
at com.openalpr.api.DefaultApiExample.main(DefaultApiExample.java:30)
Caused by: java.lang.NumberFormatException: Expected an int but was 10000000000 at line 1 column 744 path $.credits_monthly_total
at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1172)
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:225)
... 13 more

PLease advice

No module named openalpr_api

I'm experiencing an ImportError of No module named openalpr_api. I've ran the setup.py and installed the necessary commands explained in the README writeup. Got any advice for me?

plate br2 has problems

When I use country equals "br2" or "br, br2" I've been having exceptions.
Why? Is there a special way to do it works?

Getting class cast error in OSGI container - Java API

Caused by: com.sun.jersey.spi.service.ServiceConfigurationError: com.sun.jersey.spi.HeaderDelegateProvider: The class com.sun.jersey.core.impl.provider.header.LocaleProvider implementing provider interface com.sun.jersey.spi.HeaderDelegateProvider could not be instantiated: Cannot cast com.sun.jersey.core.impl.provider.header.LocaleProvider to com.sun.jersey.spi.HeaderDelegateProvider
at com.sun.jersey.core.osgi.OsgiRegistry$OsgiServiceFinder$1.next(OsgiRegistry.java:149)
at com.sun.jersey.core.spi.factory.AbstractRuntimeDelegate.(AbstractRuntimeDelegate.java:76)
at com.sun.ws.rs.ext.RuntimeDelegateImpl.(RuntimeDelegateImpl.java:56)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_73]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_73]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_73]
at java.lang.reflect.Constructor.newInstance(Unknown Source) [rt.jar:1.8.0_73]
at java.lang.Class.newInstance(Unknown Source) [rt.jar:1.8.0_73]
at com.sun.jersey.core.osgi.OsgiRegistry.hookUp(OsgiRegistry.java:421)
at com.sun.jersey.core.osgi.OsgiRegistry.getInstance(OsgiRegistry.java:119)
at com.sun.jersey.core.reflection.ReflectionHelper.getOsgiRegistryInstance(ReflectionHelper.java:842)
at com.sun.jersey.spi.service.ServiceFinder.(ServiceFinder.java:200)
at com.sun.jersey.api.client.Client.init(Client.java:214)
at com.sun.jersey.api.client.Client.access$000(Client.java:119)
at com.sun.jersey.api.client.Client$1.f(Client.java:192)
at com.sun.jersey.api.client.Client$1.f(Client.java:188)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.(Client.java:188)
at com.sun.jersey.api.client.Client.(Client.java:171)
at com.sun.jersey.api.client.Client.create(Client.java:683)
at com.openalpr.api.invoker.ApiClient.getClient(ApiClient.java:579)
at com.openalpr.api.invoker.ApiClient.getAPIResponse(ApiClient.java:436)
at com.openalpr.api.invoker.ApiClient.invokeAPI(ApiClient.java:500)
at com.openalpr.api.DefaultApi.recognizePost(DefaultApi.java:118)
at com.ryder.integration.openlprreader.ReadUtils.readLicensePlate(ReadUtils.java:27)
at com.ryder.integration.openlprreader.LicensePlateReader.run(LicensePlateReader.java:50)
at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:104) [appian-process.jar:]
at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:101) [appian-process.jar:]
at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) [appian-common.jar:]
at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:101) [appian-process.jar:]
at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) [appian-process.jar:]
at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) [appian-process.jar:]
at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:80) [appian-process.jar:]
at com.appiancorp.mdb.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:26) [unattended-request-handler.jar:]
at sun.reflect.GeneratedMethodAccessor690.invoke(Unknown Source) [:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.8.0_73]
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:104) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
... 46 more
Caused by: java.lang.ClassCastException: Cannot cast com.sun.jersey.core.impl.provider.header.LocaleProvider to com.sun.jersey.spi.HeaderDelegateProvider
at java.lang.Class.cast(Unknown Source) [rt.jar:1.8.0_73]
at com.sun.jersey.core.osgi.OsgiRegistry$OsgiServiceFinder$1.next(OsgiRegistry.java:147)
... 93 more

ModuleNotFoundError: No module named 'openalpr_api'

Hi friends,
I am working on the following project in github.
https://github.com/ShreyAmbesh/Traffic-Rule-Violation-Detection-System

installed all the needed packages for the project but when i try to run the project in pycharm i am getting the following error...

File "VehicleMoniter.py", line 21, in
import openalpr_api
ModuleNotFoundError: No module named 'openalpr_api'

I also installed openalpr in my system

C:\Users\preetha\Desktop\python project\traffic project\Traffic-Rule-Violation-Detection-System-master>pip install openalpr
Requirement already satisfied: openalpr in c:\users\preetha\appdata\local\programs\python\python37\lib\site-packages (1.0.12)

I don't know how to solve this error....

Anyone plz help me...

thanks in advance

Running "setup.py"

I tried using python setup.py install on the terminal. However, it is giving me the error in the photo. I've installed setuptools, so I'm not sure what the problem is...
screenshot 2017-02-13 16 41 21

recognize_file() missing 1 required positional argument: 'self'

Hi...
When a i trying to run this code:
try:
api_response = api_instance.recognize_bytes(image_bytes, secret_key, country, recognize_vehicle=recognize_vehicle, state=state, return_image=return_image, topn=topn, prewarp=prewarp)
pprint(api_response)
except ApiException as e:
print "Exception when calling DefaultApi->recognize_bytes: %s\n" % e

I obtain this error: recognize_file() missing 1 required positional argument: 'self'

Can somebody tell me why?

Bad Request error

    File file = new File("C:/New/anpr/snapshot/2018-04-20-102850.jpg");
    String secretKey = "sk_5e1dabe8c87bc1bc8dafd189b5d";
    String country = "india";
    Integer recognizeVehicle = 0;
    String state = "";
    Integer returnImage = 0;
    Integer topn = 0;
    String prewarp = null;
    InlineResponse200 response = api.recognizeFile(file, secretKey, country, recognizeVehicle, state, 
    returnImage, topn, prewarp);

I am using the above code to for recognize the license palte. But while runnig the program I have
"com.openalpr.api.invoker.ApiException: Bad Request" error. please Help me to solve this problem.

Issue with android code

        RequestParams params = new RequestParams();
        params.add("imageBytes", base64imge);
        params.add("secret_key", "sk_2d5cd712d3494484c19e55b8");
        params.add("country","us");
        params.add("recognizeVehicle", 0+"");
        params.add("state","");
        params.add("returnImage", 0 + "");
        params.add("topn", 10+"");
        params.add("prewarp","");
        params.add("tasks","make");
        String url = "https://api.openalpr.com/v2/recognize_bytes";

this api call return

{"error_code":400,"error":"Missing secret_key"}

Please help me..

Countries missing from docs

Hi, thanks for putting this together. I've been testing the API and it's easy and pleasant to use!

There's a small wrinkle in the documentation, which points to GH directory[1] that only seems to contain some of the supported countries. In particular, Argentina seems to be missing from the options.
In case someone else stumbles on this before it's fixed, your first guess would be correct, it's "ar" :)

[1] https://github.com/openalpr/openalpr/tree/master/runtime_data/config

File "walkway.py", line 280, in <module> img = cv2.imshow('Processed', processedFrame) NameError: name 'processedFrame' is not defined

Hi friends,
I am working on the following project in github.
https://github.com/AhmadYahya97/Fully-Automated-red-light-Violation-Detection.git

Failed to process frame
Traceback (most recent call last):
File "walkway.py", line 280, in
img = cv2.imshow('Processed', processedFrame)
NameError: name 'processedFrame' is not defined

I tried all the possible way not resolve the error

Maven dependency not found

Hi, this dependency:

io.swagger
openalpr_api
2.0.1
compile

not found on maven central....

please help me

Best Regards

Nelson

About the country code

Hi in your comments, I was able to find the supported country code, but Thailand was not in there, but after I set it up, and use your sample code, I change the country code to Thai, it is able to correctly detect Thai number plate, I want to know why and does Java support Thai number plate as well?

openalpr counts a single search as 2

When requesting a response from the api using the URL, the response shows that 2 searches were used from the available credits, even if there is only a single licence plate in the image. Is there any reason for this? I cannot see it documented anywhere.

Thanks,
Mike

Question about use of pre-warp on API calls

Hi

I'm hoping someone can help me? I'm calling the API and I've noticed that for images where the license plate is at an angle I quite often get no license plate back from the API.

I was hoping that the pre-warp parameter may help with these? Would it and do you know what sort of values to use for pre-warp?

Thanks in advance

OpenALPR cloud service used to accept multiple countries but this is no longer possible

Hello,
The OpenALPR cloud service used to accept multiple countries but this is no longer possible.
The Cloud API only specifies a string field for the country which only accepts a single country.

Request URL:
https://api.openalpr.com/v2/recognize_bytes?secret_key=sk_DEMODEMODEMODEMO&recognize_vehicle=0&country=eu,gb&return_image=0&topn=10
I see the following response:
{"error_code": 400, "error": "Could not initialize OpenALPR with given parameters"}

Changing the request to only specify a single country (eu) allowed the request to work.

This is a recent change as I was testing about 2 weeks ago with multiple countries and it was working.
Please can you check the integration API is correct and update it accordingly: (https://github.com/openalpr/cloudapi/blob/master/javascript/src/api/DefaultApi.js)

  • this still shows allowing multiple comma separated countries)

Best regards, Simon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.