GithubHelp home page GithubHelp logo

LicensePlateDetector-master\SegmentCharacters.py", line 10, in <module> license_plate = np.invert(DetectPlate.plate_like_objects[0]) IndexError: list index out of range about licenseplatedetector HOT 6 CLOSED

apoorva-dave avatar apoorva-dave commented on May 25, 2024
LicensePlateDetector-master\SegmentCharacters.py", line 10, in license_plate = np.invert(DetectPlate.plate_like_objects[0]) IndexError: list index out of range

from licenseplatedetector.

Comments (6)

apoorva-dave avatar apoorva-dave commented on May 25, 2024

Hi @cdpavan
Did you check the shape of the image loaded? May be it is not getting loaded properly. Try using the image provided in the repo itself.
Can you check what is in plate_like_objects while running DetectPlate.py? It might be empty because of which it is throwing list index out of range error.
You might be already doing this but just make sure you are commenting the code for reading video in DetectPlate.py. Uncomment the below line and try loading the image.
car_image = imread("car.png", as_gray=True)

from licenseplatedetector.

pavancd1 avatar pavancd1 commented on May 25, 2024

Hi, @apoorva-dave thank you for your reply.
yes plate_like_objects is empty and i am detecting rectangular plates.

yes I commented video part and uncommented image part

from licenseplatedetector.

apoorva-dave avatar apoorva-dave commented on May 25, 2024

Yes so because no plate is getting detected you are getting this error. You can try running the image from repo. You won't face this issue for that. As I have mentioned the code is not fully robust to handle all images or videos. You might want to improve the code in case you want it to work for all types of images.

from licenseplatedetector.

cdpavan avatar cdpavan commented on May 25, 2024

Thank you for your reply apoorva,
can you please tell me where I needs to change the code to detect rectangular plates. Your code is dectecting only square plates ...

from licenseplatedetector.

apoorva-dave avatar apoorva-dave commented on May 25, 2024

It is detecting square as well as rectangle plates as you can see in readme. Even then If you want to change the dimensions to detect your plate, then you can tweek code in DetectPlate.py where I am getting the maximum and minimum width, height of a license plate (line 59)

from licenseplatedetector.

sushi-545 avatar sushi-545 commented on May 25, 2024

hey i think i got the answer comment code for video for image
replace this line
car_image = imutils.rotate(car_image, 360)
ie change rotation to 360 and boom

from licenseplatedetector.

Related Issues (20)

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.