Monday, August 12, 2013

var_dump to file

There aren't enough links to doing this correctly from this search term.
Are you trying to var_dump to a text file? You are doing it wrong.

file_put_contents('/tmp/dump', var_export($data, true), FILE_APPEND);
There I just saved you some time.

Tuesday, March 26, 2013

Vignette Illusion?

Maybe that frame vignette not being as prominent on further shots is just an illusion. So I set the camera at one setting and moved it around. One close and one far. Setting the exposure manually to its highest setting seemed to help the vignette a bit in just eyeballing it, but here is some real results.


Here is the frame closer up. Note obvious vignette.


Here is the same frame further away. the vignette doesn't seem as noticeable. I didn't change any of the settings on the webcam but you can tell that there was some brightness changes.


Thanks to the magic of image manipulation software I'm able to compare the two images side by side for comparison. Just so one doesn't appear "more correct" I rotated them sideways.

Can you tell which image is which? The one on the left is "further away shot" you can tell because the facial coloring is slightly brighter and looks a little better.

Stare at the corners real hard and you can tell that the right side does have a slightly more cropped corner. At that level does losing a little bit of corner make up for the loss of resolution? Is the slightly more cropped corner because the image is darker and a little out of focus?

It is probably in my best interest to attempt to find a halfway point that isn't too far out, but close enough to get a perfectly locked focus. It does appear like the further from the screen you are the more accurate the ability to focus and more accurate color representation.

Adventures in Telecine Vignettes

So I blogged about how I picked my camera for my telecine previously. So I've been tinkering with settings and trying to figure out just how to get the best image quality. Increase exposure, decrease gain, adjust white temperature, etc. Then I came across an interesting artifact I didn't think I'd see.


Here is what my blank canvas looks like. Nothing special. I compared the colors from the far left with the colors from the far right and the center and they match perfectly.


A typical frame capture from the box and you'll note a pretty strong vignette happening. That upper right corner is almost completely black, but it isn't on the source. I had to investigate.



I moved the camera to the right side of the frame and a lot of that vignette disappears.


Who would have thunk it. Same on the left.


Shoving the camera in real real close and letting it stay out of focus shows a slightly different vignette effect.


Pulling the camera further out shows almost no vignette of the original source. You can still tell that the blue of the sky in the middle is a lighter tone than that of the surrounding sky but it doesn't drastically drop off. Of course I'm going to lose some of my resolution, but the colors are truer which is more important to me.

*The last shot shows a slight obstruction from a piece of wood in the bottom left corner. This was just experimentation after all.

I'm going back to the camera and see if fiddling with some of the settings might increase or decrease the vignette effect. If I can't find something worthwhile at least I made some progress today.

Here is a follow up with just to make sure the vignette wasn't a complete optical illusion.

Saturday, February 16, 2013

Picking a Telecine Camera

One or the first pieces I looked to find for my telecine machine was the camera. I needed a camera that could disable auto focus, had some exposure control, and I could capture via USB.

My first option was a Canon A70 because we had one sitting around the house and it was natively supported in Canon's RemoteCapture application. Canon officially stopped supporting remote capture on their mid level cameras shortly after the A70 and decided it was a professional grade feature. It was a perfect opportunity to make use of some hardware that was sitting around gathering dust.

In practice, it worked pretty well. The A70 doesn't support manual focus but it does allow for locking focus at a particular level. The exposure, aperture, and color temperature controls are excellent so I was feeling pretty lucky. But then I hit the sticky wicket. The A70 would completely freeze up after taking exactly 3,252 pictures. I assumed that the problem was Canon's RemoteCapture App so I started looking around and found gPhoto which thankfully had a fairly active community. I installed gPhoto on my Ubuntu laptop so I could insure that it wasn't a hardware problem. Sadly, gPhoto also took 3,252 before the camera locked up.

I reached out to the gPhoto community and they replied that every point and shoot camera seems to have an arbitrary limit on number of shots taken before it locks up. The people in similar situations would either manually restart the camera or keep them on a timer to cut power to the camera when necessary. Neither of these options appealed to me because of the lack of a real manual focus meant I'd have to rig a system to try to help keep that focus consistent between restarts.

Sadly, the A70 was no longer my ideal camera.

I briefly flirted with the idea of using a DSLR instead of a point and shoot but realized that most DSLR cameras have a max shutter life in the hundreds of thousands of frames. I'd definitely kill the camera before I was done with the box of film reels I got from my Grandma.

If only there was a solid state camera that supported manual focus that allowed some kind of remote control. So I started digging into HD webcams to see what kind of support was offered on focus, exposure, etc. Specifically, I went looking to the stop motion animation communities to see if there was any kind of super camera that everybody was using. Unfortunatly, there wasn't, but the Logitech Pro HD Webcam 9xx series seemed to be popular option with people who have Windows machines. I dug deeper and found that there was even pretty good support for that series of cameras in Linux.

Now it was just a matter of deciding between the 900, 910, or 920 version of the Logitech Pro. Pricing on the cameras was pretty similar but the 920 is the most widely available as it is the newest. So what was the difference?  The 910 was better than the 900 because they upgraded the camera to support 1080p HD. The 910 model was replaced with the 920 that has an upgraded video processor, but a slightly lesser camera sensor.

So I went with the Logitech Pro HD Webcam 910.
So far so good.

 

Monday, January 7, 2013

Mail Order Comics and Politics

I am fortunate enough that I am making enough money that I can put my money where my mouth is and pay a little extra to support people and things that agree with my general political leanings. A quick example, I will gladly pay an extra dollar to buy a gallon of milk that comes from local cows instead of from a conglomerate of loosely associated dairies that may or may not be in the state.

When it comes to buying comic books I've always wanted to buy from a local shop and reward the local guys, but after attempting to make monthly treks down to my LCS for a few months I realized that it wasn't going to be worth the gas and time it took when my monthly shipment of comics can easily be sent on a UPS truck for less than $10.

I had a great experience getting a few issues from Diamond with the guy who ran Boom Panda Comics, but sadly he closed up shop on his online store after losing money on just about every order that was placed.

I don't know how I ran across Heavy Ink, but it was some time after Boom Panda closed up shop. They run the same basic business model of selling anything that they can get direct from Diamond and running a store with as little inventory as possible. The few people they have on support staff are fairly friendly and knowledgeable, but it is clear they have other things on their plate. Their servers always seem to run a little slow during normal day-to-day operations. The one really great hook that Heavy Ink has going for it is a Bag of Crap style free for all for variant and incentive covers. If you can hit the server first and it doesn't melt you can land an issue that other sites might charge as much as $50 for cover price.

As cool as the incentive covers hook is, it has moments of being dumb. On more than one occasion I ordered an inventive cover and ended up getting a standard cover substituted without notification. I have also paid full cover price for a variant on Heavy Ink that other sites sell for a discount off cover price. The worst part of the incentives scheme is that I have wasted hours mashing refresh on the incentives page to eventually buy a cool cover, getting excited, then finding out days later that somebody else clicked it first or it was never available in the first place. To top it all off, I often find myself buying covers for series I have no interest in because I know that the actual "value" of the comic is more than what they are selling it for.

A few days ago I happened to type "heavyink" into my address bar and since it doubles as a Google search form it auto completed to "heavy ink controversy" and I had to see what that was about. The most succinct recap of the initial volley was posted by Warren Ellis titled Heavy Ink. You can go dig through all the archives if you want, but If I'm going to be willing to pay an extra dollar for locally sourced milk I am more that willing to pay an extra dollar so a coo-coo bird gun nut won't see any cent of profit from me.

I went looking for suitable alternatives. Tracked down Midtown Comics, DCBService, and Westfield as all great possibilities. I had a problem with a canceled order from Westfield previously so it wasn't going to make the top of my list even though it was geographically the closest.

The first stop was to try and see what I could find out about the guys from Midtown Comics. It wasn't too difficult to track down the origin story of a couple of friends who started a video store and decided to sell more comics and now are pretty much at the top of their game. I found a news blurb pretty quickly about a gay couple getting married at Midtown and one of the founders talking about equality and tolerance. Yes. These are my people. So I signed up for an account and started to see about moving my subscriptions to Midtown. Unfortunately, I quickly found out that unless you have 10 subscriptions that Midtown would rather you take your ball and go home. Shucks.

Well next up is DCBService. Again it wasn't too difficult to track down a couple articles about how the business got started in a basement and exactly who runs it. A couple google searches turn up a couple Facebook pages for the people who run DCBService and nothing that they posted publicly would lead a person to believe they had any political opinions at all. So I started up an account and created a pull list only to find out that even though you create a pull list you still have to login every week to pull the issues you want when they are added to the system. I'm terrible at doing things on a regular schedule. I have one credit card that isn't automatically paid and I have 4 different alerts to remind me to pay it. So DCBService is out unfortunately.

That leaves Westfield. When it comes to your last resort you can't be too picky. They offer subscriptions of any size as long as you give them a credit card and have a good selection of back issues as well. I spent an hour canceling my subscriptions at Heavy Ink and starting them at Westfield. I still have one monthly shipment pending from Heavy Ink and I'll be a Westfield man.

You want to be a good chap? Buy a Warren Ellis book from somebody who isn't Heavy Ink.