"In the world ye shall have tribulation: but be of good cheer; I have overcome the world." –John 16:33

Year: 2012 Page 6 of 11

The Wendys by Wake Tech and how to use CLEP tests in homeschool

Day 342 of 1000

Yesterday Kelly and I had lunch at the Wendys over by Wake Technical Community College.  We ate there a lot when the kids were going to Wake Tech because it was so convenient.  While we were sitting there waiting for our food, it dawned on my that this was no longer the official “on the way to school” eating place because the kids have moved on to NCSU.  For some reason that seemed pretty weird.  Then today, a lady wrote a very nice comment about some of the stuff we did with CLEP and homeschool that I have written about in a series of blog posts several years ago.  It got me to thinking.

I miss homeschool, but not nearly as much as I thought I would miss it.  Lorena, the kids, and I really did the very best we knew to do in our homeschooling.  The same is true for the community college.  Maybe that is why I feel a little nostalgic about those times, but even better to have moved on.  Sure, there are a lot of things we think we could have done better, but we really do not know how we would have known we should do them at the time–if you know what I mean.

Now that we have a new school to support, we need a new “on the way to school” eating place.  Even though the closest Chick-fil-A is not really on the way to NCSU, in light of recent events, I think it will be worth it to make the detour–a double reason to eat Chikin.

Cool stuff at my day job

Day 341 of 1000

Imaging Source CameraI have a very cool day job. Right now I am working on application with lots of excellent toys. It includes two Imaging Source 5 mega-pixel cameras (a stunning value at a list price of only $419 which includes an industrial quality machined aluminum housing, strobe output, and trigger input), an Arduino Mega microcontroller, and a Symbol barcode scanner. I am programming it using the QT and OpenCV libraries in C++ with the QT Creator IDE.

The cameras and the Arduino work great.  Now I am bringing up the Symbol barcode reader.  This is just the kind of project the doctor ordered on a weekend when the kids will be studying for finals.  Should be lots of fun–and to think I get paid for this.

Summer school finals

Day 340 of 1000

It is way to hot and humid to not be in a swimming pool this time of year.  It is even worse to be stuck in the house studying for finals.  Everything is so compressed there is no time to assimilate any of the material.  Kelly has a mid-term on Tuesday, a review day on Wednesday, and a final on Friday, all for just one class.  Temperatures are hot, tempers are short, and we need a break from each other, work, and school.  We just need to last one more week.

The almost perfect Mexican meal

Day 339 0f 1000

Lorena eats Jalepeños with her hamburgerThis is NOT the perfect Mexican meal because it does not involve tacos, cabrito, tamales, or even mole.  That being said, it is something that is pretty high on the list.  A hamburger with jalepeños and a coke.  Shortly after we got married, Lorena and I went to a McDonalds to get a hamburger.  She worked at McDonalds for a couple of years while she was in high school in Monterrey.  She still love McDonalds and we still go there pretty often.  This first time we went in Boynton Beach, Florida, Lorena ordered a Quarter Pounder.

When we got to our table she said, “Just a second, they forgot something.”

She went back to the counter and ask the girl for a jalepeño.  She was genuinely shocked that they did not have jalepeños at McDonalds in Florida.  She had worked at McDonalds and she KNEW that all McDonalds hamburgers came wth a jalepeño.  When she found out that she was not going to get a jalapeño, I think it shook her faith in America.

The next time we went to McDonalds, she still ordered a Quarter Pounder, but she sneaked a bottle of Tabasco sauce out of her purse to make up for the lack of jalapeño.

Christian has the most loyal cat I have ever seen

Rubix, Christian's loyal cat

Christian’s cat, Rubix hates everyone in the family except Christian.  Lorena especially annoys here by trying to give her tight hugs all the time.  She is amazingly dedicated to Christian–almost like a dog.  She comes and sits on his lap, computer, book, or anything Christian is using so she can just be with him.  She has been the dominant cat in the Rubix-Kiwi nexus, but that has been changing lately.  Somehow, when we switched from dry cat food to canned cat food Rubix got dramatically more passive and Kiwi got dramatically more interested in getting fed.

At first we thought it was because she was not getting enough to eat, but she is definitely not losing any weight, so now we think it is because she really, REALLY likes the canned cat food.  We made the switch because the vet said we should.  We hope it is helping Rubix lose weight, but for her, it is too early to tell.  We read up on the behavior and found that dominance can change in these kinds of cases,  The funny deal is that even though Rubix is less dominant, Kiwi does not seem to have gotten more dominant–just annoying when she comes to meow for cat food at 5:30 every morning.  It has gotten bad enough that Lorena has put a spray bottle filled with water beside our bed.  Cats and Mexican wives make for lots of drama in the household.

When it rains it pours

Day 338 of 1000

Broken persimmon treeWe had major thunderstorms in a lot of North Carolina today with high wind.  I was very sad to see some huge branches of our persimmon tree broke.  It seems like a metaphor for something, but I cannot think of what it might be right now.  I took a picture and decided it looked so much better than the picture of Grandpa Lauro and I that I would use it as the header for this blog.  It is probably not that good of a picture, but anything is better than a picture of two old fat guys with glasses on their noses putting a puzzle together in a messy house.  My thinking is that if I just improve the header a little bit each time I change it, in about ten years I might have something pretty good.

Back in Charlotte

Day 337 of 1000

It seems like all I do lately is run back and forth between Raleigh and Charlotte.  I think I might have one more trip before the end of the month, but then I should be done until after the DNC.  There is so much driving in all this that I do not have much of a chance to work on anything other than my day job.  Good thing I like my day job.

Doing a hard degree is hard

Day 336 of 1000

My brother-in-law, Lauro has a very important job in Mexico.  Part of the reason he got the job is that he went to a very prestigious school and studied a hard engineering degree.  The only way he could afford to go to that school was by studying very hard in high school to get a scholarship.  The scholarship required him to do work at the university while he studied which made his degree even harder.  His first job in Tijuana with a large Japanese manufacturing company was not so prestigious, but he did well there because he had already learned how to do hard stuff during his university years.

I have been talking to Kelly and Christian about this.  Right now they are starting the hardest part of difficult degrees with lots of high level math.  If they want to get through, they will have to work very, very hard and they will have to work long days.  They have done a little of that already, but nothing like what is coming.  If they do, they will not only get great degrees and open some new doors for themselves, but they will learn that the hard work is a joy onto itself.  The latter is WAY more important than the former and I want that for my kids.  It is great that they have the example of their uncle Lauro.

The funny deal is that it is never too late to start working hard on something that pushes you out of your comfort zone.  I went back for a Masters Degree when I was thirty-two and it was one of the great joys of my life.  At the time, I had regular misgivings about whether I was crazy or something.  My buddy Andrew is starting back for an awesome Masters Degree at NCSU.  He has always had an incredible work ethic, but I am sure leaving his day job to go back to school was not a comfortable decision.  Still, it is a joy to watch.  The thing that is cool is that my kids get to see examples like that.  My hope for them is that they take those examples to heart.

License plate reading: The template to find the plate works great, but needs some refinement

Well, I got the template matching going this evening.  It works great.  It is very forgiving for size and angle as can be seen by the images below.  The thing I really need to do next is get a somewhat bigger sample taken of cars pulling up to a fixed location so I can better characterize the size of the plate in the image over a fairly large range of cars.  The image of the pickup plates were taken further away than for the car.  There was variability in both angle and size for all the plates, but the same template set was able to find them all very well.  I have a few cleanup things I need to do before I move on which include some speedup work and some precsion improvements.  I am searching in rotation right now, but not in scale.  After I see the more controlled sample set, I will know whether I need to add scale.  After that, I will move on to segmenting the individual characters.

Found plate - car image 001

Found plate - car image 002

Found plate - pickup image 001

Found plate - pickup image 002

License plate reading: Handling plate rotation

Day 335 of 1000

Today, I was able to build an “on-the-fly” template that handles ±5º of rotation.  I just have the template search complete, too, but I do not think I will get it completed before the end of the evening.  Here is a GIF animation of all the patterns for the template search described yesterday.

Rotated license plate template gif

License plate reading: Using a template to find the lettering

Now were getting to the fun part.  I am going to start trying things, one by one, to try to find the lettering on the license plate.  The first thing I want to try is template matching.  From the very limited sample set, I can see that the license plate letters can be turned into a block of white (uising previous preprocessing combined with some morphology) like this:

and like this:

My thinking is that to start with a template that looks like the white rectangle in the image below.  I generated it automatically based on the relative size of a license plate (12″x6″) and the width of a typical car (6′) and the distance I measured between the outsides of the brakelights.

I will have to rotate the template +/- five degrees and apply it multiple times to find the best match, but that will go pretty fast.  My hope is that it will give me a repeatable, robust position of the center of the license plate.  If it does, I will try to start separating the characters.  If it does not, I will try a few more tricks.

Thoughts on starting at the University

Day 334 of 1000

About the same time we arrived in Raleigh, another fellow named Troy showed up.  He had just made a major career change and decided to go back to school to help facilitate that.  We met him at church and, because he was single (waiting to get married), we ate lunch with him pretty often.  We talked about school a lot.  It is amazing what he did.  It seems like he did everything exactly right, but it was a TON of work.  For the areas where he thought he was weak, he got a tutor.  When he was not sure exactly what he wanted to do for a living, he went and talked to several professors in each of several departments to find out exactly what they did.

Part way into the program, he decided he might want to go to graduate school.  He found out it was extremely helpful to have done undergraduate research so he went and got TWO undergraduate research projects in the two different departments in which he was interested.  He did unpaid work in a lot of it.  In the end, he could have studied in either department and they actually were competing between each other to get him.  The big take-aways from all this is that if you invest (do unpaid work with knowledge that it will turn into something good even if it is only new knowledge), work really hard, and just keep going, something good will happen.

The reason I thought about this today is because Christian and Kelly are currently in almost exactly the same place.  Troy has finished his prelims and is well into his dissertation research.  The amazing thing is that he started this process from literally nothing only five years ago.  I am grateful my kids got to watch the process and even more grateful for Troy’s example.

Indoctrination at NCSU

The kids have orientation at NCSU today.  So far they have heard about all the special benefits people receive solely because of the color of their skin or their sexual behavior choices.  It is a good thing they are Mexican or they would not receive all the special privileges and advantages that are withheld from white males.  It all seems pretty degrading to me.  Thankfully, the only have one or two more brainwashing classes each–they got most of that stuff out of the way at Wake Technical Community College.  Still, it is a shame they have to run the gaunlet of such nonsense to get to classes that actually teach them stuff that is relative true like math and chemistry.

A third of they way through

Day 333 of 1000

We are not quite to a year in our 1000 days, but we are one third of the way to meeting our goals which includes the kids’ undergraduate degrees and a few other things.  The amazing thing is that we are still on schedule.  We made an educational plan about 10 years ago and worked on it daily.  I never figured we would be able to keep up because it was pretty aggressive.  We are at least on schedule on everything, ahead on a lot of things, and way ahead on a few, fairly important things.  It is not time to celebrate yet, but we are getting closer.

Just when your starting to have fun

Day 332 of 1000

Well, just as I stared getting a good base established for my the license plate program, work starts to stack up and a new project comes in that will prevent me from doing just about anything else but program from now through the end of the year.  I started at about 7 this morning and I am still going.  I am really glad I like my job and I like to program, but I can see myself starting to burn out a little toward Thanksgiving time.  The worst part about it is the kind of project only a vision engineer could love.  I know I was pushing the boredom boundaries with my license plate project, but in terms of snooze enducement, this project is in a class by itself.  Now I have to think of something new to make this blog relevant.  This seems to be one of those periods in life where the only thing it is possible to do is keep your head down and keep working.  There is an end to this thing though, so it makes it a lot more interesting.

Rigo and family move to Toluca

Day 331 of 1000

My brother-in-law moved from Monterrey to Toluca to take a computer job there.  If you get a chance, look up the average temperature, rainfall, and humidity in that city.  It is truly amazing.  They call it the “Eternal Spring” because the temperature hangs roughly between 50 and 70 degrees F all year long.  It rains more in the summer than in the winter.  Rigo was telling us that, unlike Monterrey, it is almost never too hot to talk a long walk in Toluca.  You cannot not even make it between the house and the car without being drenched in sweat during most of the summer in Monterrey.  We are trying to think up an excuse to go down there for a visit.  It might even be nice to just stay there…

Harder to visit Charlotte

Day 330 of 1000

My room was upgraded to a two bedroom suite at my regular hotel here in Charlotte.  I am up here for one night because I have to visit a customer, but should be home tomorrow evening.  I got told that I better not plan on staying at this or any other hotel in or around Charlotte from August through mid-September because of the Democrat National Convention.  It is not like I enjoy being around that class of people anyway (political or democrat, take your pick).  I was told a lot of people are renting out rooms in their houses as there is such a dearth of places to stay.  I also got told that it would cost at least triple the normal cost to stay here during that time.  I hope that does not throw too much of a kink into my work.  There are one are two pretty big projects that are due up here during that time frame.

License plate reading: Narrowing the license plate search area

Day 329 of 1000

I had a little time this afternoon to play with the images I generated yesterday.  You can see the previous steps I took to get to this point here.  The first step I took was to find the brakelights based on yesterdays images.  That was not too hard, but I am going to have to spend some time to handle the variability in brakelight sizes, intensity, and shade.  Nevertheless, it is definitely something with which I can work.  Here are the brakelight finds for a couple of the sample images:

Back of car - brake light find Back of pickup - brakelight find

From there, I established a search window within which to look for the plate.  I put the search region at the bottom of the image which is something I will have to adjust, but I should be able to narrow the window down both horizontally and vertically without too much trouble.

Back of car - plate search ROI Back of pickup - plate search ROI

The next step will be to “robustify” the brakelight finder and narrow down the search region for the plate.  It might take me a week or so to get back to this as I have lots of stuff on my day job right now.

License plate reading: Great progress in finding the plate

I spent several hours today working on some of the preprocessing I think might help me find the license plate on the back of a car.  As always with this type of problem it is good to start with a few easy cases to help lay some of the groundwork.  That is exactly what I did.  I got a few of images each of the back of a pickup and the back of a car to use as my sample development images.  Here are a couple of sample images so you can see what I am talking about:

Back of car - original Back of pickup - original

My first thought in looking at the images is that there are a lot more edges in the area of the license plate than in other areas of the image so I ran a Sobel magnitude on the entire scene to see if that idea held water.  The following are the Sobel magnitude images:

Back of car - sobel magnitude Back of pickup - sobel magnitude

I was right about the license plate lettering, the sobel magnitude image shows a high density of edges, but the proble with this is that there are other high edge density areas of the image.  What I needed was a way to narrow down the number of edges so I decided to separate the veritcal edges from the horizontal edges.  The horizontal edge image was pretty worthless, but the vertical edge image diminshed many of the extraneous, non-licencse plate edges while still maintaining high density in the are of license plate.  The following are the vertical and horizontal edge magnitude images for the car:

Back of car - horizontal edge images Back of car - vertical edge images

So we are a lot closer than when we stared.  We could probably do some morphology coupled with connectivity analysis (blobs) and have a pretty good probability of knowing the position of the license plate for these particular cars.  After thinking about it for awhile, I thought I would try one more thing to narrow down the search area for the license plates.  One thing we have going for us is that the license plate for legal cars should always be somewhere between two red tail lights.  So the next step I thought it would be good for us to take is to create an image that maximizes the red channel and suppresses the non-red area of the image.  On these two cars, I got some pretty amazing results:

Back of car - red maximization/non-red damping Back of pickup - red maximization/non-red damping

We got very good results.  Almost everything in the image is dark with the exception of the red tail lights of the vehicles.  The letters on these license plates just happen to be red, so they showed up quite well, too, but not all plates have red lettering.  We will have to see what happens on red cars, too.  Still, license plate lettering has a finite number of colors, so we will be able to use that to our advantage in the future.  I think we are at a point now where I will be able to combine the information from the vertical edge image and the red channel maximized image to start looking for the plate.  I will do some image cleanup (morphology and other filters) along with connectivity analysis or area image statistics to isolate the plate.  I will probably do that next week or whenever I get a chance to get back to this.

License plate reading: thinking about finding the plate

Day 328 of 1000

Today, the kids need to spend most of the day at the Hill Library at NCSU again, so I will have a good block of time to start figuring out how to find the license plate on the back of the car.  I spent some time looking at images of cars and reading about approaches to find the plates.  Like all general machine vision problems, it is harder than it looks.  Sometimes there are no or very few edges that define the outer boundaries of the plate, so it is not generally a good idea to look only for the shape of the plate.  They only thing you can really depend on is that the characters on the plate are of high contrast.  I am going to look for some images that will get me started.  I will probably start with three or four images to get a concept going, then expand my efforts to increasing data sets.  I think I probably should take my camera with me to take some pictures today.  Maybe I will post a few.

Page 6 of 11

Powered by WordPress & Theme by Anders Norén