Wednesday, October 1, 2008

New Site + COMP2304

So I lashed out and paid US$6.99 and bought myself tstur.com. Originally I was going to get stur.com.au.... cos then my email could be thomas@stur... which would totally have made my day. But it turns out you have to be an australian business to buy it.. bummer. Might get my dad to buy it for us through his business.. im pretty sure his business name is just his name, so that could work. Note to self: do that. For now http://www.tstur.com/ is a pretty easy address to remember! I'm going to host my blog on it atm, and then if I ever end up making a website for anything Ill just move the blog across to blog.tstur.com or something like that. Sounds rad? I thought so.



Other news.. ive spent the last few days working on comp2304 assignment 3. The first question is this thing on image manipulation using the Corona library. Took me a while to get my head around it, cos there was a lot of pointers (*) and address of (&) manipultion needed to make sure I didn't end up with memory leaks or the such. Ended up redoing the question a few times when i kept soming up with better ways to implement it. I think the way ive done it now is pretty effecient.. its processing a 800x600 image in actual processing time of 16 milliseconds. To me that seems pretty speedy :)



Oh, ive come accross an interesting phenomenon in photoshop. I have a image with a box on it which is actually 305 x 305 pixels (93025 total). But with the first method listed below, photoshop says the selection is 307 x 307 pixels. The second method, however, is correct.

Counting Pixels In Photoshop (CS3):

- First, for both methods, set measurment units set to pixels (Edit -> Prefferences -> Units).

- Then select whatever it is with the magic wand tool.

Method 1) Look at the 'Info' tab (bring it up by clicking F8 or from under the Windows menu). BUT: it always counts 2 to many pixels in each direction (x and y)!

Method 2): Use the 'Histogram' tab (once again under Windows) and look at the 'Pixels' measurment. It tells you the correct number of pixels!



Mkk.. well I dont even know how many hours later, it is 4am and I have got Assignment 3, Q1 working as far as I can tell! It stuffs up when you use photoshop to make the picture and end up with hundereds of one pixel shapes, but other than that it seems to be working spiffily. My results for the included picture are {153,3088,11947,26268,4824,11621,44300,43847,6783}. Processed in 60-70 milliseconds. That seems pretty reasonable! Anyone want to confirm they are getting the same results? I checked it using photoshop, so im fairly sure it's right



Anyway.. its well past my bed time. Nite.

1 comment:

Tutor James said...

Hi Thomas,

Interesting post - histogram tool in Photoshop was used as the benchmark for this assignment, so good work finding it!

If you ever need to use Photoshop to make flat images in the future, turn off anti-aliasing, and save as PNG. That should avoid the millions of single pixels (where it blurs at the edges).