Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7654763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:20:23+00:00 2026-05-31T12:20:23+00:00

I am working on an ANPR system using OpenCV and have seen in a

  • 0

I am working on an ANPR system using OpenCV and have seen in a few articles a way of doing character segmentation. The idea is to make a graph showing the concentration on color across the image.

How do I do this?

enter image description here

This is the image that I have:

enter image description here

I need to detect the locations of the black areas as shown above to identify each of the characters.

I have tried adding the values up pixel by pixel but I am doing this on Android and the time this takes is unacceptable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:20:24+00:00Added an answer on May 31, 2026 at 12:20 pm

    Ok, its a month later, but I wrote you a little bit of code (in python) for this 😉

    (Assuming you are just after the image density histogram)

    import cv
    
    im2 = cv.LoadImage('ph05l.jpg')
    width, height = cv.GetSize(im2)
    hist = []
    column_width = 1   # this allows you to speed up the result,
                       # at the expense of horizontal resolution. (higher is faster)
    for x in xrange(width / column_width):
        column = cv.GetSubRect(im2, (x * column_width, 0, column_width, height))
        hist.append(sum(cv.Sum(column)) / 3)
    

    To speed things up, you need’nt alter your image files, just alter the bin width of the sampling (column_width in the script), obviously you lose some resolution if you do this (as you can see in the image below).

    In the image, I show the results (graphing hist) with your file, using column_width‘s of 1, 10 and 100. They ran for me at 0.11, 0.02 and 0.01 seconds respectively.

    I wrote it in PIL too, but it runs around 5 to 10 times slower.

    character density histograms

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on a console application using Delphi 7, and have run into a problem.
Working on a new way of using an already existing searchengine in an application.
Working with IDE like NetBeans or IDEA, i've seen that they are converting generic
Working on a project at the moment and we have to implement soft deletion
Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
Working sample using one Table SELECT t.* FROM ( SELECT TITLE.name, (TITLE.value-TITLE.msp) AS Lower,
Working with a Lucene index, I have a standard document format that looks something
Working in Java: I have a JFrame class, and separate classes for my two
Working on game. I have a movable basket and a - for now -

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.