I’m rapidly getting edumacated in the ways of C/C++ development on the OS X platform. I’ve been having a LOT of issues related to the relationship between binaries and dynamic libraries which might be complied for either the PowerPC or Intel architectures. This is because the dynamic libraries that Nikon has for the D40 are compiled on the PowerPC architecture, while my laptop and some key programs running on it are either Universal or Intel binaries. You can’t link to a PowerPC library from an Intel executable.
After HOURS and HOURS of doing some strange things to try to get around this issue, I discovered that the SDK for the D60 uses the SAME libraries but are Universal! Oh man, what a lucky find.
I’ve just now gotten a simple PERL script to load the libraries without crashing … now to write some usefull code.
I’d like to try my hand at HDR photography … but the Nikon D40 leaves something to be desired due to it’s lack of exposure bracking. This make things difficult because you need to adjust the shutter speed by hand, which means I have to jostle the camera between exposures.
Not good.
The two alternatives are to either use a single RAW image, or perhaps use software to control the camera. Of these two alternatives, the latter will probably make a better HDR. The nice thing about the Nikon cameras is that you can control everything from a USB cable attached to a PC or Mac. The bad thing is that the camera control software from Nikon will set you back about 100 bucks and its not specialized enough for what I want to do.
I took the liberty of downloading the Nikon SDK which handles the RAW image format as well as controlling the camera from the USB interface. Of course, it’s written in C which makes things ackward since I’m not the best C hacker around. I considered writing a JNI interface so that I could control things from within Java, but from experience I know that JNI can be a major pain in the butt. An alternative I’m pursuing now is to wrap the SDK in the PERL scripting language. This should in theory allow me to write scripts on the fly to make my camera do what I want.
There are some open-source command line tools for HDR image processing, so it’s quite possible that I will eventually be able to write a script that will take the pictures from the camera, convert them into an appropriate format, and run them through the HDR software. I’d be able to see the results nearly instantly instead of having to go through the time consuming process of navigating cumbersome menu’s.
I’ve gotten so far as getting the code to compile in XCode, but I fear that I will have to re-write the example code that comes with the SDK as it’s more suited for use in an application than in a library. It looks like a lot of work ahead, but it’s a fun change of pace from my normal programming fare.
I am supposed to get some additional hardware for my home office. The question was asked if my house was secure. People who know me should get a giggle at that. Of course I answered ‘yes, but of course.’ I’m sure they were thinking about people with ski masks raiding my house. I was thinking about mountain lions and bears. They detected a strangeness in my tone, so they next inquired if I had an alarm system. I simply said, “I have a gun.” The silence was priceless!!
Filed under: Uncategorized — michael.dufel @ 9:19 am
From following the financial crisis and the response by law makers, I have come to the conclusion that our entire society is sub-prime from bottom to top. We have sub prime voters who act sub prime in their jobs and who vote in sub prime politiicans who make sub prime legislation and sub prime foreign policy choices. In this respect it’s hardly surprising that we have a sub-prime financial system.
I was pleased that a lot of legislators voted down the bail out bill, but that only lasted until I heard their reasons for opposition. They voted ‘no’ but for the WRONG REASONS because they don’t have a clue. They voted ‘no’ because of a lack of restrictions on short selling and because they actually thought the problems could go away if the accountants can simply make up values for their assets. When our leaders say idotic stuff like this I just KNOW that the country lacks the constitution to solve the upcoming entitlement fiscal crisis.