Thursday, February 23, 2012

It's all 1s and 0s

Luckily I've been getting back to working on this project... I sorta realized that it's due in a little over a month and I am bound and determined to have a life (besides doing this...).

Today I still skipped out on working on rotations... (once again not looking forward to the trig and matrix multiplication I'll probably have to be doing) but I did get something else accomplished.  Once I have the QR Code pulled out, I can determine the bits of information from that image.


So there's the original image, the pulled out and rotated QR Code and then the data array of all the bits of info! Unfortunately it only works on pretty straight, non-skewed images... I'll eventually get it there though.

All I have left to do is determine what the bits have been encoded to, finish the rotation stuff, and possible port this to an Android phone... (the last part is still to be determined... I may not have the time to get that done and will have to resort to something else....)

//END OF LINE

Wednesday, February 22, 2012

Rotations!

After a few hours of work I was able to get this....


The images on the lefts are the original picture and the ones on the right are the extracted QR code in the correct position!!!

Sadly it only currently works when the QR code is rotated 90, 180, or 270 degrees... 
Unfortunately getting the rest of the rotations is going to involve some trigonometry. I haven't done that in a while and my brain has been mush the last couple of days from playing way too much minecraft. But soon I will google enough trig to rotate my image and get this project finished... hopefully!

//END OF LINE

Sunday, February 12, 2012

Excuses... Excuses...

I haven't worked on my project at all this week... My only excuse is that I've finally been given something to do at work. Also instead of coming home and working on it... I've become a pintrest member... yeah...

But I have decided that my children will grow up with weird parents... I'm going to put this by the door of my future house...


My children will also not have goals or tasks, but requirements that must be satisfied (and yes more than likely they will be ambiguous and incomplete).

So, here's to hoping that their first words will be "Hello, world!"



//END OF LINE


Friday, January 27, 2012

So yeah...

I think, but I'm still not certain, that I will be changing my senior project from developing in WebOS to the Android platform. The entire reason really is C++ vs Java. Normally I'm a big C++ fan but when dealing with images and simple GUI's... Java wins...

So in some of my research I've been doing just to get a basic idea of what to do in java, I've actually made some progress in the QR code detection area.


Yes I am really that excited I drew colored lines on this picture... but more importantly, my program was able to find the finder patterns on the QR code (the boxes in the corners), even when it wasn't a square QR code.

//END OF LINE

Wednesday, January 25, 2012

Stuck

Well I got a GUI design for my QR code up and running... which is great but it really doesn't do much with the current stub code I have. But I've run into some problems. Obviously javascript isn't going to be able to do the image processing I would like it to do so I have to use something else. Luckily WebOS has a PDK for just that sort of thing. It allows the developer to "seamlessly" integrate c/c++ into their app. Well that's all fine and dandy if I had an actually c++ program up and running (which of course I don't). So I've been doing some research as to how I'm going to implement the actually pulling out of the QR code from an image and I honestly have no idea. I have to figure out how I'm going to actually pull the image into the program (because c++ has no built in libraries for doing that) and then implement an actually algorithm for finding and then decoding the QR code. I just haven't had the time I need/want to do more research.

The weekend is coming up soon and I have another project due soon but hopefully I'll be able to get some time to figure out where I'm headed.

//END OF LINE

Thursday, January 19, 2012

Finally Some Success!!!

After many long days and nights of searching, struggling and always coming up empty handed, I have finally figured out how to take pictures using enyo on a WebOS platform. It has been so frustrating because all the resources I have found are slightly vague and not very useful. Documentation for the framework is slightly lacking from what I've seen and it's been a real fight to find a solution. But as I said before I have finally found one. I'm planning on implementing it in with the rest of my UI design for my QR Reader and hopefully it will all work out smoothly... (that never happens...).

But for those you just as frustrated as I was, here's my .js file for my project so far.

enyo.kind
({
name: "MyApps.Capture",
kind: "VFlexBox",
components:
[
{kind: "Video", name: "streamTheVideo", style:"width:98%;height:93%;top:6%;left:1%;position:fixed"},
{kind: "enyo.MediaCapture", name: "mediaCaptureCamera", onInitialized: "loadCamera",
onImageCaptureComplete: "pictureTaken", onError: "someErrorOccured"},
{kind:"Button", name: "myButton", caption: "Take Picture", onclick:"capturePicture"}
],
load: function()
{
this.$.mediaCaptureCamera.initialize(this.$.streamTheVideo);
},

rendered: function()
{
this.inherited(arguments);
this.$.mediaCaptureCamera.initialize(this.$.streamTheVideo);
},

unload: function()
{
this.$.mediaCaptureCamera.unload();
},

loadCamera: function(inSender, inResponse)
{
var format;
for (i = 0; inResponse["video:1"].supportedImageFormats.length != i; ++i) {

fmt = inResponse["video:1"].supportedImageFormats[i];
if (fmt.mimetype == "image/jpeg") {
break;
}
}
this.$.mediaCaptureCamera.load(inResponse["video:1"].deviceUri, fmt);
},

pictureTaken: function(inSender)
{
this.captureType = "IMAGE";
this.$.myButton.caption = "picture Taken";
},

capturePicture: function()
{
var myexifdata  =  {
orientation: 3
};
var ImageCaptureOptions ={orientation: 3,'quality' : 100,'flash':"FLASH_AUTO",'reviewDuration':5,'exifData':myexifdata};
this.picName = "PicSample" + Date.parse(new Date()) ;
this.$.mediaCaptureCamera.startImageCapture('/media/internal/dts/image/' + this.picName + '.jpg', ImageCaptureOptions);
}
});


Some of the stuff I'm probably and hopefully end up changing when I implement it in my QR Reader, but for now it just works.

//END OF LINE

Friday, January 13, 2012

WebOSing

I've gotten to work in WebOS a little more and I've had some progress. I'm getting really excited to work on my senior project. It's going to be pretty awesome... hopefully.


This is how I'm feeling... which is what I've been wanting for a long time!

//END OF LINE