OpenCV in citizen media 3D compositing?

Last week someone put an interesting item onto Hack-A-Day; someone who’d built their own “CT Scanner”. And functionally it is. It takes x-ray images from all angles around an object, which they then scan into a computer and let it turn the platen images into a 3D model. I believe the latter was done using OpenCV scripts.

The recent and ongoing Occupy Wall Street protests in New York City have generated a large amount of citizen-media footage (albeit released without sound in many cases, to avoid breaking outdated wiretapping laws).

If key events observed from different positions could be found to align the timelines of footage, it seems plausible that the same scripts used in the CT scanner could be used to assemble a crude animated 3D model of the events as they unfold.

For purposes of evidence gathering and contextualisation of the news stories, it seems this could be a very useful tool, rendering isolated and often repeated footage into singular but multifaceted logs of events from every recorded angle.

I doubt it would be of high quality, due to all the variables and low-quality of the footage used, but it could perhaps knit together the results with the events that preceded them, and at least help in giving a more rounded view of events.

Bang, zoom, to the courtroom Alice!

I may have mentioned CSTART before. It’s an organisation with a promising ideal; an open-sourced space program.

It’s the application of that ideal that’s proving a problem.

Some of the primary goals of the organisation are laid down as making it a globally collaborative, non-profit, volunteer organisation to organise and provide funding for development of open-designed space hardware and software.
The biggest problem this throws at the ideal before it gets off the ground is a legal one, and that’s not something you can ignore. CSTART likes the idea of basing the non-profit registration in the USA, but the USA has ITAR (International Traffic in Arms Regulation). And while discussion of items already in the public domain is permissible, any new development would be illegal to distribute out of the country. This is because of the risk that information on rocketry could be readily weaponised. And while I can’t find specific legislation, the odds are other countries would be similarly litigious on the subject.

A fairly relevant example would probably be to mention the New Zealand man who in 2004 was bankrupted after attempting to develop a “DIY Cruise Missile”. The bankruptcy was a result of litigation from the NZ Inland Revenue, though Mr Simpson believes the litigation was under direct pressure from the USA. While that’s not a provable link, the project itself stirred up quite a wasps nest. The hardware was all off-the-shelf, built with minimal tooling, some custom coding, 50 year-old principles, and was built on a very small budget. If there was no actual illegality in the project, simply describing it as a Cruise Missile accomplished one of the authors goals; to show “weapons” of similar functionality to their mil-spec namesakes could be built on a fraction of the budget with little specialised work.

There’s a long discussion that could be gone into over the legitimacy of the argument behind these fears, but I believe the upshots to be:

  1. Terrorists won’t invest that many resources in a single device with low returns.
  2. World governments won’t use it because far more refined technology can be bought, stolen and/or copied.

In any case it seems to me autonomous long-range weight-carrying drone aircraft would be far more likely to be of use in drug smuggling.

Excusing for a moment the matter that developments with potential for weaponisation are already being published online and are apparently therefore outstripping the ability of governments to locate, research and prosecute, the “threat” still remains. So it is likely it’s only those that actively attract attention to themselves that will feel that axe fall.

Trying to community-source a moon landing is going to attract attention.

The idea that items could be developed and made public domain immediately has been mentioned on CSTARTs forums and also falls short, as the process of developing them to a point where they can be published would require them to already be in the public domain to develop them in the global community.

Even assuming that other countries are fine with such open development, it would still require the exclusion of the USA.

Making CSTART a single world-spanning org would legally prevent it from making any new developments. (Or place it in breach of a US law that would mean at very least it wouldn’t be able to be a non-profit there very long, or render a lot of it’s members bankrupt from fines.)

So CSTARTs premise has mutually exclusive goals in it’s current form.

A solution?

Something needs to be altered, and I think the best candidate is to change CSTART from a singular entity to a series of national groups operating under one banner. While this alone don’t solve the problem of information-sharing, it does make it easier to manage. Localised groups can work on developments within their own ranks and then publish them to the public domain for further development by the community as a whole. Problem solved!

The downside of this, you may be quick to point out, is it breaks a sense of community down. And when you have goals as (literally) lofty as a space-program, you need as large a resource-base as you can get.

However this portion is a problem I believe can be solved with technology.

Software Premise 1: A distributed forum system

My solution to the issue would require creating a new type of internet forum software, where selected portions of the database were shared with other instances of the forum on other hosts.

In this system, communal areas of discussion such as those dedicated to technology already in the public domain or subsequently deemed safe for unrestricted development, are shared. Instances of the software on different servers synchronise these postings between themselves so each forum has a live version of the communal posts.

Regional forum areas would be listed in all instances, but their content would not be shared until local moderators approved it as “safe”. A useful detail however could be to include live regional summaries in the form of statistics, to give a sense of community activity without content actually being shared. Possibly encrypted versions of those local posts could also be stored on other forums as backups, but even in that unreadable state it may still present a legal issue.

Forum user IDs would also require synchronisation, which on public areas at least would provide redundancy; if one forum goes down, users can temporarily migrate to another host. Users would of course require authentication by moderators to ensure they had legal citizenship before allowing access to the nation-specific areas.

To some those checks may seem excessive, but forum moderators often have to do similar to ensure members are of legal age if wishing to access adult sections of discussion groups.

Further upsides to the the idea are that it would promote physical meetings and increase the likelihood of subsequent material experimentation, as well as allow redundancy and additional flexibility (again, rules binding developments in one country may not exist in another and pre-formed national groups would enable smoother hand-overs).

A warning

The need for promoting material experimentation is also a crucial one. CSTART is not the first group of its kind; there have been many other enthusiast groups with goals of actually getting people into space. And most have decayed into apathy soon after.

  1. Form internet discussion group
  2. Attribute goals, structure, cool project names, abbreviations, etc..
  3. Discuss whatever facets of projects happen to come up ad-hoc
  4. Watch as traffic falls as people get frustrated with lack of progress
  5. Wait for forum owner to close it due to lack of interest

CSTART has a more focussed structure than most enthusiast groups so it’s coming apart in a slightly different way, but at a bit over a year old it’s lost some of it’s original core and it’s discussion traffic is slowing. It’d edging into Step 4, apparently stalled because of the issue of setting up a non-profit somewhere.

It may be worth sugesting that top-down control of crowd-sourced groups is difficult, bordering on impossible. Again, I feel the goals are incompatible with the logistics. The non-profit is a wonderful idea to fund steps in physical development. But beyond member donations, getting money in seems difficult. There’s also a usage issue; while reverse-engineering technologies on an amateur or non-profit premise is often permissible, it’s also an arrangement that will actively prevent their use in any professional sense later on.

A specific example could be a group building a cheap rocket and managing to get their own satellite up then being approached to take money for launching someone elses. Suddenly it could be a paying job, you’d have enough money for further rockets, but you can only follow this opportunity if you build a rocket using different technology, effectively starting from scratch again because the reverse-engineered work is no longer non-profit.

You could take only enough to cover costs and keep doing it for the love of it, but the motivational hit of turning down extra funding would likely be a big one.

Designs need to be open-sourced and not reverse-engineered under the auspices of being not-for-profit. It’s an important issue to raise early to prevent issues later on.

Software premise 2: The recyclopedia

This is actually an idea I’ve mentioned some time back in my old blog and on a few mailing lists. It’s also something I think could probably be of use here.

Provisionally the idea was to resolve the issue of reference legitimacy on Wikipedia by combining it with Project Guttenburg, while at the same time resolving the formatting issue with older books lacking index or proper table of contents.

The idea would work like this: Take public domain textbooks (something currently far less archived than popular fiction) and copy them into special source pages. You then create pages for a subject and insert portions of text from those public domain works by referencing book, chapter, page number, paragraph or what-have-you. The CMS would then insert the text as a series of linked quotes into one page, by default arranging the references in chronological order and creating a visible history of development on a particular subject.

Foot-notes could be added to the context pages to account for any critical mistakes, changes in standards of measurements, etc, while the original source remained unchanged. In fact if books were arranged by unique ISBN code then a book could be slowly assembled over time, quote by needed quote (ISBN or similar required to ensure identical source material and version).

It would require several different interfaces for book viewing, quote management, and wiki-like interlinking of contextual articles, but in the case of an open-source design system such a self-referential repository of public domain information would be invaluable as a starting point for future developments. In the context of something like CSTART it could readily compile everything from basic physics and engineering to Von Braun’s V2 blueprints.

In conclusion

Both the software ideas I’ve suggested here I feel would be excellent aids to not only a group like CSTART or it’s successors, but other open groups as well. It also provides a much needed sense of involvement for those with programming skill who would love to help out on these engineering projects but feel they have nothing material to offer.

As far as the groups themselves go, the underlying structures don’t seem fit to support them yet. And even if the ideas I’ve described here would help, fully implementing them in such a project would still need to be done alongside consultation with lawyers to make sure something with such inherent legal and financial risks is put in place properly. So far running in saying “we don’t need to think of that yet” has only lead to people becoming disheartened as subsequent ideas outpace ability, and we need to stop that. The potential exists, and our only stumbling block is our own sense of self-control. We must put the facilities in place so our imaginations can be focussed toward achieving these lofty goals.

I hope that if my assumptions are flawed someone will correct me, and if they are correct perhaps yet more individuals interested in collaborating on such projects will step forward.

Advice on OpenOffice Database design?

Need some advice on Forms & layout.

I’ve been doing the tutorials, because I need to make an inventory database for my business. The paper one really ins’t cutting it.

The easiest way would be to include forms for entering orders, rather than adjusting item stock levels one at a time. However I’m having a bit of trouble thinking how to plan the forms for it.

If I have a table for orders, then I have to somehow make it so it can handle an unknown quantity of differing items within it’s entry. And while that may be possible I think it would mean some easy-to-break parsing of multiple entries in a single table cell.
The alternative seems to be to create a sales table where each item type per sale is it’s own set of data, but some may share an order number. I think it would also mean the order contents would only be visible in Query results after entering, not the order Form, which would be a problem if I needed to amend an order. Can entry forms collate data like that? I suspect so, but the tutorial I ran through didn’t mention it, only display of single table entries.

Both would need me to design a form capable of extending as needed, ideally with drop-down menus of items to select from.

The latter seems the most reliable solution atm.

I need to get this done soon, so if someone can offer advice on more options or point me to guides on this sort of aspect of database building, I’d be very grateful!

Eye-Fi and mobile phones – instant remote backup of photos?

Curious about the use of the Eye-Fi to instantly back-up your photographs, using your mobile phone as an access-point.

When I first heard about the Eye-Fi SDHC a couple of years ago, I was very intrigued, but saddened that it seemed so locked in to one service. But time’s gone by now, and it looks like they’ve opened their doors a lot wider.
The Eye-Fi is an up to 8Gb SD card with a built-in 802.11n wifi functionality. The idea is that when a photo is taken, it’s stored and also uploaded by any open wifi point to the web service. And now there’s a number of services including YouTube, but more importantly I feel, the open-source Gallery 2. The Gallery 2 option means it can now upload to your own personal webspace, located in the country and legal protections of your choice.

However it still requires you to get within 27meters (max) of an open wifi point. And with the spectre of an un-redacted Digital Economy Act looming, open wifi points may soon become rather thin on the ground.

However, one of the things that came up in the original discussion of the Eye-Fi was the idea of using a data-enabled SmartPhone with wifi as a bridge. Eye-Fi talks to your phone via 802.11n, phone talks to the internet via 3G or other mobile broadband. It’s a delightfully simple and compelling concept, but one that has apparently seen little development. Perhaps I’ve simply not found it yet, but it’s hard to find discussion of the subject past 2007.
Certainly you could use a laptop for the same purpose, but that shouldn’t be necessary, particularly as open-source phones such as the Android now exist, where the necessary programming should be relatively simple. And in any case, the uptime comparisons are unlikely to favour it.

In a world where police can illegally demand or force you to delete the video and images from your camera, I for one would treasure the warm inner glow from knowing that while the originals are gone, identical copies have already transferred to my phone and on to a secure server on the other side of the planet.

So if anyone knows of a bit of software to turn your SmartPhone into a passive wifi access-point/bridge, I’d love to hear about it, as I’m sure others would.