Category: Literature


*Post originally contained information on how to backup your comics, redacted at the request of Comixology’s CEO.*

Digital comics are a great thing, and I’m slowly amassing a reasonable library of them through the fantastic Comics.app (Comixology) on the iPhone/iPad. One thing concerns me though and almost holds me back from buying all the issues of Witchblade I want so I have the full collection. Seeing as I’m currently selling all my dead tree copies of the same I want to know that my digital comics are safe & not going to go anywhere. There’s no option on Comixology to view what you’ve purchased in the past and certainly no options to download CBR’s or similar of your purchases. As has just been pointed out to me by David Steinberger (Comixology CEO) they are indeed viewable on the web, here:

Comixology Online Comic Viewer – Account login required.

I swear that was white paging for me last night, which is why I decided to look into scripting an extraction process in the first place.

So the problem with digital distribution is that in a lot of cases you do not really own what you buy. What happens when digital distribution providers vanish? You are normally left with a purchase encumbered by DRM that you cannot read. Your investment wasted. This is a worrying development in consumers rights. If I purchase a comic/book/cd/game in a bricks and mortar store nobody can really take that away from me. I can scan it/copy it and keep it if I so wish and nobody is really going to know unless I start waving it around on the web. I can also loan the item itself to friends. They can enjoy that and go on to collect/purchase the item or recommend it to their friends leading to increased sales. Admittedly Kindle are doing this now and it’s a great thing, bringing some of the functionality of real books into the digital world.

What if I choose/amforced to abandon the provider… Say I no longer can use an iPhone/Android or have some argument with Amazon and refuse to use their services? I have made those purchases, not rented them. It’s not like deciding to avoid Waterstones or Sainsbury’s.

How do I take them with me? Well in many ways as it happens but with laws such as the DMCA and others it makes it potentially illegal to do so. Like so many strict interpretations of copyright law when handled by corporations they criminalise and therefore marginalise the very people who are the biggest fans. A recent example of this for me was the BBC’s showing of some of Bob Monkhouse archive. He was a huge huge fan of TV/Radio comedy and did everything he could to archive these for his personal use. It got him arrested, although charges were eventually dropped. Some TV shows now recognise this dichotomy, I believe Tru Blood is very lenient towards it’s fans use of it’s imagery. Other’s not so (*cough*Harry Potter*cough*). Another recent example I saw on 4chan’s /co/ board. Somebody had ripped and posted scans of an entire comic for others to read, effectively saying this is ace look look! The author of the comic noticed and joined in the thread, not to condemn but to encourage. Get out there, read my stuff, please buy my books. That’s to be applauded, it clearly worked for him and drove sales. Perhaps that only works for the smaller publishers… would it have worked to promote say, AP Comics Darkham Vale or Com.X’s Bazooka Jules, the first two issues said x/6 the 3rd said no such thing and turned out to be the last. Similar stories exist with Young Liars by David Lapham and other big names as well and that series was beguiling, confusing and excellent. It didn’t work for the piloted and then leaked TV version of Warren Ellis’ Global Frequency, mores the shame.

I for one am happy to get digital comic books to read for less than a 1/3 of the price UK stores tend to charge. It’ the price point digital distribution should be, significantly less than the corporeal version not some 10% tip of the hat. iBooks especially but Kindle and Waterstones etc. take note… your prices are a fucking joke, in some cases 50% plus (amazon) higher than you yourself sell the dead tree version. There is NO way a digital copy of a book should ever cost more than the dead tree version. Are they trying to protect their paper manufacturing arms? Perhaps publishers, in a vertical investment, have shares in managed forests, tree felling, pulping and paper producing industries and they think this protects their alternate revenue streams.

I’m not new to Kevin J. Anderson’s writing by any stretch but this is certainly the first novel of his that has left me in such an undecided state. I’m not a fan of his style but I did enjoy several of the Dune universe extensions he wrote with Frank Herbert’s son. What differs here is that this is something entirely of his own creation and something he obviously has a very clear vision of. The book itself has believable and likeable characters occupying a well thought out universe with a pretty damn good plot to tie it all together. It ends a bit abruptly but I find that entirely forgivable seeing as all seven books are out. It may feel derivative to someone who has read a lot of space opera with the usual diplomacy, suppressed peoples, mystical/religious cultures and of course impending doom but the book never felt too derivative in that respect.
I enjoyed the book and indeed want to know what happens both to some species and individual characters/relationships. I will without doubt read the next one in the series, although I probably won’t devote the same amount of time to absorbing each word like I normally would. So what has spurred me to write a review? Something has always niggled about Anderson’s writing and I’ve never been able to characterise why in the past, reading this novel solidified why. The main problem is two fold, repetition and repetition. Err.. sorry I meant repetition. Did I write that again? Maybe I thought you didn’t take it in properly in the preceding sentence. I understood very quickly that several things were true, the proud Ildiran Solar Navy was undefeatable for example. Or the Klikiss robots made some uneasy. Or that the Theron Green Priests could communicate instantly via Treelings and that they represented a huge knowledge base etc. etc. That’s fine but telling me the same thing over and over again every time they are mentioned or perform an action is unnecessary at least and at worst insulting. Each time the solar navy performs a manoeuvre or a general is mentioned you do not need to remind me how proud they are, normally using the same sentence structure/adjectives. Another issue is that the book rarely surprises as the author’s intentions are telegraphed too far in advance, this isn’t always related to the repetition but is certainly a bedfellow of it. Consequently you know many of the stories key moments chapters ahead of schedule and in some cases at the beginning of the book.
It’s a shame in a way as I can’t shake the feeling that with a better editor the story being told here would truly shine and deliver some genuine moments along the way. That’s not to say it doesn’t or cannot surprise but I get the feeling it could be so much more. I’m also not saying it wasn’t an enjoyable enough read. Perhaps that’s the highest compliment I can give it. I enjoyed the book enough that the problems it does have inspired me to complain about them. If the story and characters were not compelling I would simply dismiss it and move on.

A little bit of this and that.

Quite a few things have vied for my attention this week. I ploughed through 2 books, namely The Girl who Played With Fire a book on Obj-C. I’m now reading The Girl who Kicked the Hornets Next and Living Next Door to the God of Love (which I feel obliged to read to complete the authors set). Dragon Age has lured me back in and Awakenings was duly completed, then Darkspawn Chronicles fell and Leliana’s Song was started, which I hope is good as she ended up being my main’s partner in the first part. This made me think. What game has vied the most for my time? I could only think of two. Dragon Age and Fallout 3. I know Mass Effect 2 is probably a distant 3rd along with some close run compadres. It turns out that Dragon Age, combining play times for all expansions thus far + alts, comes to 127 hours. With Leliana’s song to go. Fallout 3 combined play time according to Steam is 105 hours. Bloody Hell!

In other news the iPhone project has come along reasonably well. I’ve rounded off all three panes of the UI (Add New, View Saved, Settings) and started on the custom views required for each type of task under Saved. I’ve found an expansion to opencv called cvblobslib which looks interesting although an initial run against a picture using the iphone 3G’s camera comsumed 3GB of ram in the emulator. Way outside of the 40MB Max (during opencv) and 2-3MB in standard use target I have for the iPhone app. Aside from that I realised again that with regards to computer vision less is so very very much more. To this end I re-jigged how I operate. Regardless of whether I land on a best method of blobs or contours I tweaked my original process from:

  1. Smooth
  2. Flatten
  3. Threshold
  4. Find Contours
  5. Draw Largest

To this:

  1. Create a copy of the image scaled down to 1024 if image is larger
  2. Keep a copy of the scaling factor required
  3. Smooth
  4. Flatten
  5. Threshold
  6. Find Contours or Find blobs
  7. Draw Largest scaling up discovered co-ordinates if found

This has several benefits, the two obvious ones being it uses far less ram and it’s much much faster for the same result. As a result the blob method becomes viable. The less obvious benefit is it’s actually more accurate. With higher resolution photographs the grain of the paper and reflections etc. all add detail to the image that clouds what you are trying to ‘see’. Thus scaling down, much like the smoothing, discards this unnecessary detail. By working on a copy when I need to access higher quality information (say for OCR or letting the user highlight an area to save for future direct reference in the case of complex text or image based clues) I can simply scale up the co-ordinates and pluck out the original data.

Alongside this I’ve got the hang of using the Instruments tool provided with XCode to track down memory leaks and the app is now 100% leak free. Which should save time later before it gets even MORE complicated.

Also Hough Transforms. I hope. Please god work even though I do not understand you fully.

Patrick in the comments asked for a bit more info on using cvblobs, so here it is:

Ok here’s what I hope are the relevant bits. Under build settings and ‘Other Linker Flags’ I have set:

-lstdc++ -lz $(SRCROOT)/opencv_simulator/lib/libcv.a $(SRCROOT)/opencv_simulator/lib/libcxcore.a $(SRCROOT)/opencv_simulator/lib/libcvaux.a

Where opencv_simulator is a directory containing my OpenCV libs built for the simulator, e.g. debug on and built for i386 and not arm. libcvaux.a is the file containing the cvblobs stuff.

The code snippet is:

			/* Use opencv expansion library for BLOB detection */
			CBlobResult blobs;
			CBlob *currentBlob;
			CBlob biggestBlob;

			// find non-white blobs in thresholded image
			blobs = CBlobResult( working, NULL, 0 );
			// exclude the ones smaller than last value in func.
			blobs.Filter( blobs, B_EXCLUDE, CBlobGetArea(), B_LESS, 10000 );

			// Having filtered above to get rid of the minnows get the big boy.
			blobs.GetNthBlob( CBlobGetArea(), 0, biggestBlob );

			// Create image for display
			temp = cvCreateImage(cvGetSize(working), IPL_DEPTH_8U, 4);
			// display filtered blobs
			cvMerge( working, working, working, NULL, temp );
			swapIplImage(&temp, &working);
			cvReleaseImage(&temp);

			for (int i = 0; i < blobs.GetNumBlobs(); i++ )
			{
				currentBlob = blobs.GetBlob(i);
				currentBlob->FillBlob( working, CV_RGB(255,0,0));
			}

			biggestBlob.FillBlob( working, CV_RGB(0,0,255) );

			// Adding all the contours to the animation
			display = [self UIImageFromIplImage:working];
			if(display) {
				steps++;
				[animation addObject:display];
				self.image = display;
			}

			cvReleaseImage(&working);

In the code above the variables are:

IplImage *temp, working;
UIImage *display;
NSMutableArray *animation;

In the code the variable working contains the initial input, which at that point has had the following operations performed already:

- Scaled to a lower resolution maintaining aspect ratio.
- Gaussian smoothed n times.
- Flattened to 1 channel (2 colours), e.g. IPL_DEPTH_8U as required by a lot of the cv functions.
- Adaptive Threshold applied with cvAdaptiveThreshold.

The final steps are involved in displaying some of the output back to the iPhones display for me, so I can see what blobs it’s detected etc. Hence the use of a NSMutableArray of UIImages which I go on to make an animation in a UIImageView. The use of cvMerge, IIRC, is to convert the 8U image back into a full image by simply merging it three times (by passing in the working image as each channel).

Don’t take any of the above actions as gospel, the only real requirement is to have an IPL_DEPTH_8U image which is what the functions require as input. I do the above to clear out noise, but my success was limited and I moved onto another project. Although I will revisit this in the future.

It’s worth noting here that the whole project was experimental for me, and in the settings for my app I had a switch that flipped between cvblobs and the standard cvFindContours routines. The cvBlobs code was far cleaner and shorter, however I never really settled on either as being better… in part because a lot of my input data was poor. E.g. noisy due to light conditions and the limitations of the iphones camera. I eventually found that reducing the size of the images and a certain amount of blurring helped but I never got it working as consistently as the Sudoku Grab app that’s in the store and it was a lot slower to process images.

HTH

Powered by WordPress | Theme: KLG based on Motion by 85ideas.