We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

API documentation outdated and search broken

I am trying to work around another bug and finding some incomplete documentation as well as pretty major discrepancies between the documentation and the actual product (Barcode Recognition 5.5.0). I am using the API documentation here:
https://reference.aspose.com/barcode/net/aspose.barcode.barcoderecognition/barcodereader

CustomizedThreshold sounds like it might be useful, and it exists as a property on my object so I look at http://www.aspose.com/docs/display/barcodenet/CustomizedThreshold+Property and see that “This property works only the ThresholdHints.Customized Hints was set.”. Well ok, so I look for where to set ThresholdHints and don’t see any other properties that make sense, so I do a search (www.aspose.com/docs/dosearchsite.action?queryString=ThresholdHints) returning no results. I try another search (http://www.aspose.com/docs/dosearchsite.action?queryString=ThresholdHints.Customized) for ThresholdHints.Customized and it only returns a reference to needing to enable it (from the ustomizedThreshold property pages). I do some more digging and find this thread (SetHints - ScanStrengthHints.Strong option obsolete) that seems to imply that scanstrengthhints are obsolete, I’m going to assume that CustomizedThreshold was part of that process and is also obsolete because I don’t see any other way to turn it on. Moving on…

I decide to look at the documentation for a property I’ve been using to get more information on it “ImageBinarizationHints”, but it’s not documented in the API reference. A quick search for “ImageBinarizationHints” seems to be broken, returning no results yet I know it’s referenced here (https://docs.aspose.com/barcode/net/improve-barcode-recognition/). The only problem is that last page lists the options but doesn’t describe what each option does or why you would want to use it? Some are obvious but I have no idea what HLS is, should I use it? Should I stick with Grayscale?? Off to Wiki I go, turns out it’s related so color and I don’t care about that so I stick with Grayscale.

Next I decide to look into the “OrientationHints” property… except it’s also not listed in the API reference. I know that it is referenced in the programmer’s guide (www.aspose.com/docs/display/barcodenet/Barcode+Orientation) except I can’t pull that page up right now because the site is running slow. That’s ok because I know I’ve read that page and I think it just provides a basic sample of setting the hint to Rotate90, but doesn’t tell me how to effectively use this property. What happens if I change this property after I’ve started reading? Looking at intellisense in Visual Studio I see this is an enum, why not bitflags where multiples could be provided, or at least why not provide a “Veritical” and “Horizontal”. Do I need to create an object to scan at Rotate90 then recreate it to scan at Rotate270? Is this property just a “hint” and it scans in that direction first and
then in other directions or is it more of a rule where it will only scan
for barcodes in that direction? I’m pretty sure it’s just a hint because if you don’t set it it is default to “NoRotate” which I would guess is 0 degrees, but it still finds (inaccurately valued) barcodes that are rotated 90 degrees. The page about orientation finally loaded and it says “In this case, the barcode reader tries to detect the barcode in all possible directions.”, in what case is it talking about? The case where the hint isn’t set at all, is that different than if I explicitly set “NoRotate” even though that seems to be the default?

I feel like I’m beating my head against a brick wall trying to get anywhere here, can you please answer some of the questions about the rotate hints and custom thresholds, and update the documentation for this product?

Hi


Thanks for your inquiry and sorry for the inconvenience you faced.
TheMitasGroup:
CustomizedThreshold sounds like it might be useful, and it exists as a property on my object so I look at http://www.aspose.com/docs/display/barcodenet/CustomizedThreshold+Property and see that “This property works only the ThresholdHints.Customized Hints was set.”. Well ok, so I look for where to set ThresholdHints and don’t see any other properties that make sense, so I do a search (www.aspose.com/docs/dosearchsite.action?queryString=ThresholdHints) returning no results. I try another search (http://www.aspose.com/docs/dosearchsite.action?queryString=ThresholdHints.Customized) for ThresholdHints.Customized and it only returns a reference to needing to enable it (from the ustomizedThreshold propery pages). I do some more digging and find this thread (SetHints - ScanStrengthHints.Strong option obsolete) that seems to imply that scanstrengthhints are obsolete, I’m going to assume that CustomizedThreshold was part of that process and is also obsolete because I don’t see any other way to turn it on. Moving on…
I would like to update you that we have already logged an investigation to check CustomizedThreshold and CustomizedScanStrength properties under ticket id BARCODENET-33478. This issue has been resolved. We have removed these properties in our next release of Aspose.BarCode for .NET 5.6.0.
TheMitasGroup:
I decide to look at the documentation for a property I’ve been using to get more information on it “ImageBinarizationHints”, but it’s not documented in the API reference. A quick search for “ImageBinarizationHints” seems to be broken, returning no results yet I know it’s referenced here (https://docs.aspose.com/barcode/net/improve-barcode-recognition/). The only problem is that last page lists the options but doesn’t describe what each option does or why you would want to use it? Some are obvious but I have no idea what HLS is, should I use it? Should I stick with Grayscale?? Off to Wiki I go, turns out it’s related so color and I don’t care about that so I stick with Grayscale.
I managed to replicate the problem that the searching docs don’t return all results. I’ve escalated this issue to our web team with detailed description about the scenario. As soon as any information is shared by them, I will be more than happy to share that with you.

Second, please note that the MedianSmoothing technique gives a perfect result. In more complicated images, less data will be lost by taking the median. MedianSmoothing removes the noise from the image while preserving the image edges. HLS is also a Color space similar to RGB. But instead of red, green and blue components, HLS contain Hue, Luminance & Saturation components. It’s a color space in which the Hue, saturation and luminance of a color can be separated and modified. The Grayscale image processing technique can be useful while detecting bar codes from scanned or slightly damaged images. The probability of bar code detection will increase by this setting.

TheMitasGroup:
Next I decide to look into the “OrientationHints” property… except it’s also not listed in the API reference. I know that it is referenced in the programmer’s guide (www.aspose.com/docs/display/barcodenet/Barcode+Orientation) except I can’t pull that page up right now because the site is running slow. That’s ok because I know I’ve read that page and I think it just provides a basic sample of setting the hint to Rotate90, but doesn’t tell me how to effectively use this property. What happens if I change this property after I’ve started reading? Looking at intellisense in Visual Studio I see this is an enum, why not bitflags where multiples could be provided, or at least why not provide a “Veritical” and “Horizontal”. Do I need to create an object to scan at Rotate90 then recreate it to scan at Rotate270? Is this property just a “hint” and it scans in that direction first and then in other directions or is it more of a rule where it will only scan for barcodes in that direction? I’m pretty sure it’s just a hint because if you don’t set it it is default to “NoRotate” which I would guess is 0 degrees, but it still finds (inaccurately valued) barcodes that are rotated 90 degrees. The page about orientation finally loaded and it says “In this case, the barcode reader tries to detect the barcode in all possible directions.”, in what case is it talking about? The case where the hint isn’t set at all, is that different than if I explicitly set “NoRotate” even though that seems to be the default?
Based on your inquiry, I would like to update you that these orientation hints are used to rotate the bar code before passed in recognition. It does not make sense of the flag enum. Bar code read method also auto detects the orientation of the bar code e.g. in some cases, you can recognize a bar code with 90 degrees without setting orientation hints. You are right because NoRotate means 0 degrees. It would be great if you can share the problematic bar code images here in this thread. We will take a closer look and guide you accordingly.

Please let me know in case of any confusion or questions.

It would be great to see the documentation updated with this information, as well as the expected performance hit/enhancement/comparison between the binarization hint options.

The image is the same one as the other thread (which most members won’t be able to see due to the fact that I wanted the attachments to be private, not sure how that works by default):
Code128 not reading properly
Attachment curPage.bmp

I am trying to figure out how to be as confident as possible that the barcode read and it seems the only way to do that is to read the image several times with different rotate hints.

Hi Doug,


Thanks for the information. I have updated the appropriate documentation pages with the above information and sure we will include some other helping articles like the comparison and enhancement in the near future.
TheMitasGroup:
The image is the same one as the other thread (which most members won’t be able to see due to the fact that I wanted the attachments to be private, not sure how that works by default):
Attachment curPage.bmp
I already have logged this problem under ticket id BARCODENET-33569 in our issue tracking system. Our development team is working to analyze the problem. We will let you know as soon as we have made some significant progress. You don’t need to read the bar code image several times with different rotate hints because you can set other possible rotations in a single line:

reader.OrientationHints = RecognitionHints.Orientation.Rotate90 | RecognitionHints.Orientation.Rotate270;<o:p></o:p>


Please let me know in case of further assistance or questions.

Above it sounded like you were saying it doesn’t make sense for the OrientationHints to be a BitFlags based enum due to the processing mechanism, and yet your last line of code suggests that it is?

So, I tried:
oBarCodeReader.OrientationHints = RecognitionHints.Orientation.Rotate90 | RecognitionHints.Orientation.Rotate270

… and it doesn’t work, a quick “Go To Definition” on the Orientation" enum shows it is not configured for flags (but the ImageBinarization is):
public class RecognitionHints
{

[Flags]
public enum ImageBinarization
{
None = 1,
HLS = 2,
Grayscale = 4,
MedianSmoothing = 8,
}

public enum Orientation
{
NoRotate = 1,
Rotate90 = 2,
Rotate180 = 4,
Rotate270 = 8,
}
}

Hi Doug,


Thanks for the information and sorry about the confusion. Because this is not flag enum and there is no reason to use “|”. Please accept our apologies. Please let me know in case of further assistance or questions.

Hi Doug,

Thanks for your patience.
TheMitasGroup:
I decide to look at the documentation for a property I've been using to get more information on it "ImageBinarizationHints", but it's not documented in the API reference. A quick search for "ImageBinarizationHints" seems to be broken, returning no results yet I know it's referenced here (https://docs.aspose.com/barcode/net/improve-barcode-recognition/).

Next I decide to look into the "OrientationHints" property... except it's also not listed in the API reference. I know that it is referenced in the programmer's guide (www.aspose.com/docs/display/barcodenet/Barcode+Orientation)
I have received a response from our web team. I would like to update you that it is working fine because what you are expecting is not supported. Search works on complete word, doesn't search partial text If you search complete text it will return your desired result. e.g. "RecognitionHints.ImageBinarizationHints.MedianSmoothing"

and “BarCodeReader.OrientationHints”


Please let me know in case of further assistance or comments.

Fair enough, though I don’t think it’s very user friendly… and that is even considering that your user base is typically fairly advanced.

It may be worth filing it somewhere under feature request rather than bug report.

Hi Doug,

Thanks for your answer. I've added my comments in our internal Wiki along with my findings. So I'm waiting for the response of our web team. As soon as any information is shared by them, I will be more than happy to share that with you.

It may be of use to you that we use a library aforge.net and do a lot of the image cleanup (filters, deskew, contrast, bit depth etc) before we send in to Aspose for recognition

Paul,

Thanks for the information. Unfortunately this bug occurs
on images that have always been digital files so we do not have any
noise or contrast issues (start with pdf, open it and place barcode,
close and save, open file again convert entire page to image and read
for the barcode). For now I just have the page scanned like 9 different
times with different settings, it’s very time consuming but it is
critical for the results to be accurate and unfortunately that’s the
only way I could be sure.

This thread was more about the struggles that the Aspose users may be going through if they are trying to use the official documentation (I’ve had similar results with the Aspose.PDF.Facade namespace, and there’s another thread for that). If you’re interested in reading about the bugs and limitations that prompted the workload which in turn prompted this post you can view it here:
Code128 not reading properly

There were two bugs opened, and fixed, and now I’m just waiting for them to be released. The release is “expected” this week, though I’ve seen the same wording on posts in which the release didn’t come for several weeks after it’s “expected” date so… fingers crossed.
-Doug

Doh, I marked that post private because I didn’t know how the forum attachment system worked at the time… and now I can’t un-mark it, sorry.

Basically there is a problem when scanning a full page for barcodes (BARCODENET-33569). This is also a bug related to the constructor for BarcodeRecogniser that takes a rectangle where it takes about half a second, vs 25ms to slice the image yourself and then pass in only the sliced image (BARCODENET-33572). Both of these have been fixed and are due in the next version 5.6.0.

Hi Doug,

Thank you for sharing details.
TheMitasGroup:
There were two bugs opened, and fixed, and now I'm just waiting for them to be released. The release is "expected" this week, though I've seen the same wording on posts in which the release didn't come for several weeks after it's "expected" date so... fingers crossed.
-Doug
I would like to share with you that our development team is working hard to deliver the new release of Aspose.BarCode 5.6.0. This delay is because we had included some advanced algorithms. Later, we came to know that these tasks are more complex than we initially estimated. We have now decided to deliver the release of Aspose.BarCode 5.6.0 without these algorithms so far we excluded a number of issues. These advanced algorithms will be a part of our next release of Aspose.BarCode 5.7.0. Please take a look over latest updates below:

Issues id: BARCODENET-33569
Status: Resolved
Reslolution: Fixed
Fix Version: Aspose.BarCode 5.7.0

Issues id: BARCODENET-33572
Status: Resolved
Reslolution: Fixed
Fix Version: Aspose.BarCode 5.6.0

Second, you can mark this thread as private, so now no other users (except you and Aspose staff members) can see or reply. We're sorry for the inconvenience and appreciate your cooperation.

I’m fine with other users being able to see and comment on this thread, I
was actually saying that I wish I could mark the other post as
not-private.

Thank you for the update but I must say it is very disappointing that the most critical bug has now been delayed in it’s release schedule. Putting off an update that fixes a completely crippled product (for what I am using it for, full page scan barcode searches) for a week or two is one thing, but months… that’s pretty rough.

Hi Doug,

Thank you for your comments and please accept our apologies. We do understand your concerns. In fact, as I shared earlier it is due to a special reason. We'll avoid such delays in the future. Did you mean you are unable to mark this forum thread as public? If not could you please share the post link you require to mark as public (not-private)? We'll look into the matter and guide you accordingly.

That is correct, when I try to edit the post the Keep this post private is disabled so I can’t uncheck it.

Hi Doug,

Thanks for the confirmation. You don't need to edit the post. Are you able to see a button named as "Make Public" in the post header? If yes then you can click this button and check if it works for you. I have attached a screen shot for your reference.

I hope, this helps.

That button is not available to me.

Hi Doug,

Thanks for the information. I got confirmation from our web team. I would like to update you that this option is only visible to Staff members. It is due to some security reasons. Anyways, this option is not working for me as well. I'm in communication with our web team. I'll get back to you soon. We're sorry for your inconvenience.

Hi Doug,

Thanks for your patience. It is to update you that I have marked this forum thread as public. Please let me know in case further assistance or questions.