Ask Your Question
1

Where to begin for a license car plate recognition system

asked 2019-04-16 04:45:14 -0600

ShadowKing gravatar image

I am interested in creating a car plate license recognition system for my university carpark system. How do I begin or where should i start? I have done some research on various ways that can be taken such as using OpenCV, ALPR, etc. But I am a begineer in image processing with no prior knowledge so I am not sure where or how I should begin. I just need some guide on where to start.

  1. Which image recognition is the most suitable or easy to implement between OpenCV, ALPR, PyTessract, etc.
  2. Would the CCTV camera at the entrance be suffice to be able to scan the carplate efficiently or a good camera is needed?
  3. Using any of the softwares in my first question, is it possible to build a GUI for it instead of just using a command line to generate the output.
  4. I have tried to search for resources online but it is very scattered everywhere. I am a bit lost on how or where i should start. Which programming language would be suitable? Python, C++, Java?
edit retag flag offensive close merge delete

Comments

take a look at openalpr

sturkmen gravatar imagesturkmen ( 2019-04-16 05:01:33 -0600 )edit

Question #4. Python has been rating #1. Java placed second and c++ placed third. Fortunately, Python is easier for you and it widely used electronics, industries, appliances, etc.

supra56 gravatar imagesupra56 ( 2019-04-16 21:48:01 -0600 )edit

3 answers

Sort by » oldest newest most voted
1

answered 2019-04-16 05:53:12 -0600

HYPEREGO gravatar image

updated 2019-04-17 09:01:14 -0600

If you are also a beginner in programming, then it gonna be hard, but if you doesn't have a timeline, then it's possible, and for that I suggest you to use OpenCV, you'll learn a lot of stuff and it is a good thing also to have in the CV (curriculum vitae). You'll learn maybe more than required maybe, but it worth. Otherwise the suggestion from @sturkmen is perfect, ALPR is a project aiming in recognize car plates.

  1. OpenCV is probably the most complete framework for most of the Computer Vision application. So it is the best out-of-the-box, in my honest opinion, it provide you almost everything you need. As I always say, it provide you the tools to achieve the result, but time is required usually and even some time spent on papers and theory.
  2. It depends, many things affect the result: weather, occlusion, translucent surface , sensor quality, lenses, resolution, position of the camera etc. If you already have a CCTV camera, then you can take a frame and evaluate the quality yourself. If you can see the car plate with your eye, then an algorithm can probably do also.
  3. Yes it is possible to integrate OpenCV in, for example QT application or even a web gui. Is up to your skills, you can always write a wrapper to integrate the data for a visual GUI, database or whatever.
  4. Depending on what are you going to do and your knowledge. C++ in my honest opinion is the best for OpenCV, but I also look for performance and that's why I say that. On the other hand Python is easy to use and it can be integrated easily in many environment

BTW.. This goal have been exploited in "every sauce", just google "recognize car plate opencv": you'll find tons of videos and tutorial in order to achieve that :)

I also would like to say that OpenCV is widely used worldwide and you can always find support and at least some ideas in how to solve a problem.

edit flag offensive delete link more

Comments

I know that there is a lot of such resources online. But most of it are just research papers and I am still thinking on how to integrate the system into getting the camera footage as most of the resources out there are just relying on static pictures of car plates not camera footage.

ShadowKing gravatar imageShadowKing ( 2019-04-17 10:28:21 -0600 )edit

Is still a good starting point, what it change is only where the images came from. There are some tutorial and resource, like this Youtube tutorial or some suggestion from here in python. I don't know which setup are you using.

In my opinion, you need to divide your problem and think about every single little problem: -First of all, you need to be able to read and show the video stream in OpenCV -After that is done, you can try to recognize carplate using the code that you can find around the web (is the same, you just need to convert a videostream into a cv::Mat) -Then you can consider to develop a GUI, maybe using a QT template

HYPEREGO gravatar imageHYPEREGO ( 2019-04-18 04:13:23 -0600 )edit

If the CCTV camera is an IP camera, try this one: https://funvision.blogspot.com/2016/1...

HYPEREGO gravatar imageHYPEREGO ( 2019-04-18 04:26:07 -0600 )edit
1

answered 2019-05-27 15:38:16 -0600

BobaTeaGood gravatar image

I strongly recommend Plate Recognizer. Very easy to use, with awesome support. All the documentation is right there, so it's easy to follow. They support Python, Javascrip, Ruby and Shell.

edit flag offensive delete link more
0

answered 2019-12-27 00:28:07 -0600

Maybe you can begin with OpenAlpr.Here is the source code I ever used in this alpr system

import android.app.Activity; import android.content.ContentValues; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.provider.MediaStore; import android.support.v7.app.AppCompatActivity; import android.text.format.DateFormat; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageView; import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast;

import com.openalpr.api.DefaultApi; import com.openalpr.api.invoker.ApiException; import com.openalpr.api.models.InlineResponse200; import com.yalantis.ucrop.UCrop; import com.yalantis.ucrop.UCropActivity;

import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Calendar; import java.util.Locale;

public class MainActivity extends AppCompatActivity { private final DefaultApi api = new DefaultApi(); private static final String TAG = "MainActivity"; Button reconize,select; TextView result,plate; ImageView showImage; Spinner spinner; String secretKey = "sk_960d6f4c62d1c20452c7613e"; String url = "https://qnwww2.autoimg.cn/youchuang/g..."; File cameraFile,cropFile; private boolean isFromfile = false; String country = "us"; final Integer recognizeVehicle = 0; final String state = ""; final Integer returnImage = 1; final Integer topn = 10; final String prewarp = ""; private String cropPath = ""; String[] countrys ; String[] countryCodes ;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    reconize = (Button) findViewById(R.id.reconize);
    select = (Button) findViewById(R.id.selectImage);
    result = (TextView) findViewById(R.id.result);
    showImage = (ImageView) findViewById(R.id.imageShow);
    plate = (TextView) findViewById(R.id.plate);
    spinner = (Spinner) findViewById(R.id.spinner);

// GlideUtils.setUrlImage(this,url,showImage); countrys = getResources().getStringArray(R.array.countrys); countryCodes = getResources().getStringArray(R.array.country_codes);

    select.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            String filename = DateFormat.format("yyyyMMdd_hhmmss", Calendar.getInstance(Locale.CHINA)) + ".jpg";
            cameraFile = new File(Environment.getExternalStorageDirectory() + "/Pictures/Camera/" + filename);
            if(!cameraFile.exists()){
                try {
                    cameraFile.createNewFile();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            Intent intent0 = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

            if (Build.VERSION.SDK_INT < 24) {
                intent0 = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                intent0.putExtra("android.intent.extras.CAMERA_FACING", 0);
                intent0.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(cameraFile));
            } else {
                ContentValues contentValues = new ContentValues(1);
                intent0.putExtra("android.intent.extras.CAMERA_FACING", 0);
                contentValues.put(MediaStore.Images.Media.DATA, cameraFile.getAbsolutePath());
                Uri uri = MainActivity.this.getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues);
                intent0.putExtra(MediaStore.EXTRA_OUTPUT, uri);
            }
            isFromfile = true;
            startActivityForResult(intent0, 200);
        }
    });
    reconize.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            result.setText("identifying...");
            plate.setText("");
            try {
                new Thread(){
                    @Override
                    public void run() {
                        super.run();
                        InlineResponse200 response = null;
                        try {
                            if(isFromfile){
                                response = api.recognizeFile(cropFile, secretKey, country, recognizeVehicle, state, returnImage, topn, prewarp);

                            }else {
                                response = api.recognizeUrl(url, secretKey, country, recognizeVehicle, state, returnImage, topn, prewarp);

                            }
                        } catch (ApiException e) {
                            e.printStackTrace();
                        }
                        final InlineResponse200 finalResponse = response;
                        runOnUiThread(new Runnable() {
                            @Override
                            public void run() {
                                if(finalResponse == null){
                                    Toast.makeText(MainActivity.this, "识别失败", Toast.LENGTH_SHORT).show();
                                    return;
                                }
                                Toast.makeText(MainActivity.this, "识别成功", Toast.LENGTH_SHORT).show();
                                if(finalResponse.getResults()!=null && finalResponse.getResults().size()>=1 ...
(more)
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-04-16 04:45:14 -0600

Seen: 4,900 times

Last updated: Apr 17 '19