Create thumbnails in C++ - c++

Wondering if anyone knows how to create thumbnails in C++ from NITF 2.1 images

Using the package below you should be able to read a NITF image and then generate your own smaller version to save as a thumbnail.
NITRO is a full-fledged, extensible library solution for reading and writing National Imagery Transmission Format (NITF) files, a U.S. Department of Defense standard format. It is written in cross-platform C, with bindings available for other languages (C++, Java, Python). NITRO was originally developed by General Dynamics - Advanced Information Systems in 2004 and is continuously being improved. It is now released as open-source software under the Lesser GNU Public License.
http://nitro-nitf.sourceforge.net/wikka.php?wakka=HomePage

Related

Existing API for NLP in C++?

Is/are there existing C++ NLP API(s) out there? The closest thing I have found is CLucene, a port of Lucene. However, it seems a bit obsolete and the documentation is far from complete.
Ideally, this/these API(s) would permit tokenization, stemming and PoS tagging.
Freeling is written in C++ too, although most people just use their binaries to run the tools: http://devel.cpl.upc.edu/freeling/downloads?order=time&desc=1
Try something like DyNet, it's a generic neural net framework but most of its processes are focusing on NLP because the maintainers are creators of the NLP community.
Or perhaps Marian-NMT, it was designed for sequence-to-sequence model machine translation but potentially many NLP tasks can be structured as a sequence-to-sequence task.
Outdated
Maybe you can try Ellogon http://www.ellogon.org/ , they have GUI support and also C/C++ API for NLP too.
if you remove the restriction on c++ , you get the perfect NLTK (python)
the remaining effort is then interfacing between python and c++.
Apache Lucy would get you part of the way there. It is under active development.
Maybe you can use Weka-C++. It's the very popular Weka library for machine learning and data mining (including NLP) ported from Java to C++.
Weka supports tokenization and stemming, you'll probably need to train a classifier for PoS tagging.
I only used Weka with Java though, so I'm afraid can't give you more details on this version.
There is TurboParser by André Martins at CMU, also has a Python wrapper. There is is an online demo for it.
This project provides free (even for commercial use) state-of-the-art information extraction tools. The current release includes tools for performing named entity extraction and binary relation detection as well as tools for training custom extractors and relation detectors.
MITIE is built on top of dlib, a high-performance machine-learning library, MITIE makes use of several state-of-the-art techniques including the use of distributional word embeddings and Structural Support Vector Machines[3]. MITIE offers several pre-trained models providing varying levels of support for both English and Spanish, trained using a variety of linguistic resources (e.g., CoNLL 2003, ACE, Wikipedia, Freebase, and Gigaword). The core MITIE software is written in C++, but bindings for several other software languages including Python, R, Java, C, and MATLAB allow a user to quickly integrate MITIE into his/her own applications.
https://github.com/mit-nlp/MITIE

how to write c/c++ extension for adobe air(or flex)

is there a official sdk for c/cpp programmer to write extension for AIR or FLEX?
This will happen soon. Adobe posted this document today : http://www.adobe.com/content/dam/Adobe/en/devnet/devices/pdfs/DevelopingActionScriptExtensionsForAdobeAIR.pdf
It's only for AIR for TV yet but they said it will be available for AIR for mobiles next
You can use PixelBender to do certain image based calculations in C/C++. There is also a little known project called Alchemy which was meant to use existing C/C++ libraries in Flash, however this project is fully supported yet and I don't recommend using it because results are varied.

starting smartcard programming

How could one get started with smartcards programming? I am asking here about all the toolkit he needs in order to get started: books, tutorials, hardware etc.
I am planning in playing around with a couple of smartcards programmers and I am pretty new to this field.
Edit: I am mostly interested in programmers that play nice with Unix-like operating systems. Also, I am not sure how this works ... but I would like to program them in C/C++
Whenever I've needed to access smart cards for use in security applications it has been via either:
Microsoft CryptoAPI
a PKCS#11 library for the card.
To access a card using the Microsoft CryptoAPI a card specific Cryptographic Service Providers (CSP) is needed. The CSP sits under the CryptoAPI layer.
If you are developing on Unix/Linux using 'C/C++', however, then you will probably want to take a look at the PKCS#11 standard from RSA. The standard specifies a 'C' API called Cryptoki (Cryptographic Token Interface) which gives a common abstraction above all types of crypto devices. Nearly all smart card vendors provide a PKCS#11 library for their cards that you can program against using the Cryptoki API.
If you want to access the smart card/reader at a lower level you can use APIs such as PC/SC or CT-API.
PC/SC defacto standard for smart card access implemented on Windows, Linux and Mac OS X
CT-API provides only very minimal functionality; not very suitable for modern apps.
If you are interested in writing Java applets that run on smart cards then you probably want to look http://java.sun.com/javacard/
Resources that may be of use
OpenSC is a set of libraries and tools for smart cards. It is designed to work with PKCS#11 supporting cards. OpenCT provides drivers for card readers, and tokens that are comprised of both a card and a reader (ie. usb tokens, and other ’complete’ devices).
http://www.linuxnet.com/ MUSCLE - The movement for use of smart cards in a linux environment
PKCS#15 - Cryptographic Token Information Format Standard
Smart Card Handbook
A presentation on PKCS#11given at the RSA conf in 2009.
PyKCS11 A Python wrapper around PKCS#11. These type of wrappers can provide a simpler higher level interface than working directly at Cryptoki level.
Smart Card Alliance
Java is beginning to get a huge grip in the SmartCard market, pushed by very big players (like IBM).
There are entire countries where people are carrying a Java Card in their pocket. For example there are more than 10 millions Belgium citizens whose (mandatory-to-have-with-them) national ID card is a Java Card running the BELPIC "applet".
If I'm not mistaken the entire Brazilian health care system is also based on Java Card(s).
Regarding SmartCard and Linux, here's the Linux SmartCard howto (note that that howto is full of the "Java" keyword everywhere):
http://www.faqs.org/docs/Linux-HOWTO/Smart-Card-HOWTO.html
Then there's a .pdf called "Exploring SmartCards" from June 2008 which takes a look at the big mess that the "SmartCard" world is and that basically starts by explaining that "SmartCard" is about as descriptive as saying "computer": that is, not very descriptive ; )
If you google about you can find smartcard development kits that offer a programmer, a few sample cards, and manuals, reasonably inexpensively.
It also helps to have an understanding of cryptography (especially public-key crypto), and some practice at packing data into really really tiny structures.
Smartcards range from the incredibly dumb (a secure 1kb memory store) to the fairly sophisticated (I've see ones advertised that run a cut down .NET framework).
Probably the most commonly used smartcards are the units produced by Mifare which are generally made as travel tickets but also used as loyalty cards or even access permits.
It is very late to give answer but I would like to give one add-on to the answer of #bignum.
Well, you can start playing around with Java smart card development and I would like to recommed one good book for understanding the know how for beginners and developers. "Java Card Technology for Smart Cards".
If your pocket budget allows then you can buy a "Mobile Security Card" for researching and development of the smartcards applets using the knowledge gained from the book mentioned above.
And you can also refer or use a smart card API project SEEK FOR ANDROID hosted on googlecode for first hand experience.

How to replace text in a PowerPoint (.ppt) document?

What solutions are there? I know only solutions for replacing Bookmarks in Word (.doc) files with Apache POI?
Are there also possibilities to change images, layouts, text-styles in .doc and .ppt documents?
I think about replacement of areas in Word and PowerPoint documents for bulk processing.
Platform: MS-Office 2003
What are your platform limitations?
Obviously Apache POI will get you at least part of the way there.
Microsoft's own COM API's are fairly powerful and are documented here. I would recommend using them if a) you are not running in a server (many users, multithreaded) environment; b) you can have a proper version of powerpoint installed on the production machine; and c) you can code against a COM object model.
It's a bit pricey, but Aspose.Slides is a very powerful library for manipulating PowerPoint files
If you include using other Office suits as an option, here's a list of possible solutions:
Apache POI-HSLF
PowerPoint 2007 APIs
OpenOffice.org UNO
Using POI you can't edit .pptx file format, but you don't depend on the apps installed on the system. Other two options, on the contrary, make use of other apps, but they are definitely better for dealing with presentations. OpenOffice has better compability with older formats, by the way. Also if you use UNO, you'll have a great choice of languages, UNO exists for Java, C++, Python and other languages.
My experience is not directly with Power Point, but I've actually rolled my own WordML (XML) generator. It a) removed all dependencies on Word, b) was very fast c) and let me build up documents from scratch.
But it was a lot of work to create. And I was only creating a write only implementation.
I'm not as familiar with Power Point, so this is conjecture, but you may be able to roll your own by reading XML (Power Point 2003??) and/or cracking the Office Open XML file (zipped XML), then using XPath to manipulate the data, and then saving everything back to disk.
This won't work on older OLE Compound Document based Power Point files though.
I've done something like that before: programmatically accessed and manipulated PowerPoint presentations. Back when I did it, it was all in C++ using COM, but similar principles apply to C#/VB .NET apps, since they do COM interop very easily.
What you're looking for is called the Office Document Model. Basically, Office applications expose their documents programmatically, as trees of objects that define their contents. These objects are accessible via an API, and you can manipulate them, add new ones, and do whatever other processing you want. It's exceedingly powerful; you can use it to manipulate pretty much all aspects of a document. But you'll need an installation of Office and Visual Studio to be able to use it.
Some links:
Intro: http://msdn.microsoft.com/en-us/library/d58327k6.aspx
Hope this helps!
Apparently new users can only include one link per posting. How lame! :)
Here's the other link I meant to include:
Example of manipulating PowerPoint documents programmatically: http://msdn.microsoft.com/en-us/library/cc668192.aspx

Moving an engineering application from standalone to internal to CAD

I have a large MFC C++ application that I would be very keen to port into AutoCAD and IntelliCAD. AutoDesk offer Object ARX for this purpose, which replaces the older and slower ADS technology. IntelliCAD, afaik only supports ADS. Has anyone out there done this, and if so which tools did you use and what pitfalls did you encounter?
I'm specifically interested in resources that will simplify the transition, and allow me to maintain seperate CAD based and standalone versions going forward.
Have a look at my answers to a couple of previous AutoCAD questions
Open source cad drawing (dwg) library in C#
.Net CAD component that can read/write dxf/ dwg files
If you were looking for the same code base to work both inside and outside of AutoCAD then the RealDWG approach may work for you since the code is the same - RealDWG doesn't need AutoCAD as a host application. The open Design Alliance libraries are for making stand-alone applications. Both have supported C++ for years & can be considered stable - well, as stable as CAD gets.
This blog (http://through-the-interface.typepad.com/) is a good one for RealDWG
One option to consider is to target AutoCAD and Bricscad. Supporting AutoCAD and IntelliCAD requires essentially two versions of code. Bricscad's goal is to be completely compatible with ObjectARX, and in my experience they are pretty close.
This at least simplifies the problem from supporting three instances (your standalone version, AutoCAD, and IntelliCAD) to supporting two instances (your standalone version and AutoCAD/Bricscad).
"DWGdirect is not just a SDK to read and write DWG files. It actually offers a full blown framework that can be used to develop a professional CAD application, complete with plug-in architecture and all." quote source