SDK Upgrade to v10.5

Upgrading from earlier versions of our v10 SDK is quick and easy! There are some additional data files to deploy, and some small coding changes to make. This FAQ will focus on these upgrades, so if you are upgrading from v9 or an earlier SDK, please contact us for additional support. If you’re looking for information on backwards compatibility of upgrading, you can read this FAQ.

All our sample code projects provided with the SDK are updated for the features discussed below, so if you’re new to our SDK, just start there and those should work out-of-the-box. As always, we’re here to help, so please contact your designated representative if you need assistance.

If you are not using Scene Detection:

Scene Detection is now a fundamental part of our image corrections, even when applying a single preset to your photos. This is because our new version of AI Skin Tone Accuracy and AI White Balance both perform tasks in the “calc” processing step. As such, you’ll need to enable Scene Detection and other “ai features” when processing images, even if not using Scene Detection to pick which preset to apply. This is easy, you’ll simply need to create an AIEngine, then reference it in either PFC_Calc() or PFC_AutoCorrect(), like this:

PFCENGINE *pAiEngine = PFC_CreateEngine();
 
// Load AI engine (assuming all dlls and models are in exe folder):
std::string exePath = std::string(argv[0]);
std::string binPath = exePath.substr(0, exePath.find_last_of('/')).c_str();
int aistatus  = PFC_LoadAIEngine(pAiEngine, AI_SCENE_DETECTION | AI_CORRECTIONS | AI_COLOR, binPath.c_str());

If you are using PFC_AutoCorrect(), then the last step is to add this new AIEngine to your PFC_AutoCorrect() call:

PFC_AutoCorrect(&im, NULL, ignoredParam, -1, NULL, false, NULL, pAiEngine, true);

If you are using the separate PFC_Calc() and PFC_Apply(), then add the additional items to calculate:

PFC_Calc(&im, NULL, pEngine, CALC_ALL | CALC_SCENE_DETECTION | CALC_AICOLOR, -1, NULL, NULL, myStatus, PFC_REJECT_MONOLITH, pAiEngine);

If you are using Scene Detection:

If you are already using Scene Detection, then it’s even easier. The only change you’ll need to do is to add AI_COLOR to the list of features to enable in your AIEngine.

When you deploy your solution using Perfectly Clear, there are some additional files you’ll need to deploy:

FilePurpose
pro_and_universal_20211221.pnn
skintone_20211221.pnn
Scene Detection and Skin Tone detection models for Pro and Universal Presets
school_and_sports_5000200.pnn
skintone_5000200.pnn
Scene Detection and Skin Tone detection models for our new School and Sports presets
aicolor.pnnModel for our AI White Balance corrections

If you know you will not need specific preset models, then those model files do not need to be deployed.

Keep Reading