detect empty pictures

  • 441 Views
  • Last Post 02 January 2019
Turan posted this 25 September 2018

Good day!

I have test blank with 3  answer region, i must take and export images , it is easy, but problem is to export only answered pictures(not- blank).

I think FlexiCapture have some tools or methods to find blank image.

Is it possible with script to find noise or noise percentage. if yes, can you give me some examples?

Thanks in advance!

Order By: Standard | Newest | Votes
Ekaterina posted this 04 October 2018

Hello,

You may use the IPictureObjectsInfo.BlacknessPercentage property. 

Using the following code in the Rule script you'll be able to know the percentage of black pixels inside your field:

int blacknessPercentage = Context.Field("<your field name>").Regions[0].Picture.AnalyzePageObjects(null).BlacknessPercentage;

Then, based on the some threshold, you may determine if the field is blank or not.

In general, if you use your own customized export, you can include or exclude from it any fields, but if you are using the built-in FC export, to suggest to you better ways of exporting/non exporting of such fields, we'll need to look at your project and some sample images.

  • Liked by
  • Melisa Uy
Turan posted this 05 October 2018

Thank a lot !

Melisa Uy posted this 20 December 2018

Hi Ekaterina,

 

question on blacknessPercentage.

previously I was on FC12 Release 1, and this code was working:

Context.Field("LastPageSignature").Regions[0].Picture.AnalyzePageObjects(null).BlacknessPercentage;

 

yesterday, I upgraded to Release 2 and now Iam getting this error:

System.Runtime.InteropServices.COMException (0x80004005)

Internal program error:

Src\EmptyPageProcessor.cpp

 

Do you have any idea why previously was working in FC11, FC12 R1 but not on latest release?

 

Thanks!

Attached Files

Ekaterina posted this 21 December 2018

Hello Melisa,

This is a known bug of FC12 R2, it will be fixed in FC12 R3.

Sorry for inconvenience caused.


  • Liked by
  • Melisa Uy
Melisa Uy posted this 02 January 2019

thanks! got it :)

Close