Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing resolution reduction #690

Open
Sahil-5111998 opened this issue Apr 4, 2023 · 1 comment
Open

Implementing resolution reduction #690

Sahil-5111998 opened this issue Apr 4, 2023 · 1 comment

Comments

@Sahil-5111998
Copy link

Hi,

I am trying to implement resolution reduction on some binary images, the same resolution reduction that is implemented in the JBIG (I think JBIG2 does the same).
I am getting stuck in its implementation and I hope that you can help me here.

In the JBIG docs they have said that JBIG uses the resolution reduction table to perform the resolution reduction, however I am not able to make out how that table is being used.

In the implementation, they have told that the value of a low-resolution pixel depends upon 9 high and 3 low-level pixels. the values of 0-7 high-level pixels act as an index to the resolution reduction table. However, I am not able to understand how to get the value of low-resolution pixels from that table. i.e., by raster scan I am able to get the value of 7 high-level pixels and then how would I make out the low-resolution pixel value?

I know it is a very basic question but I was not able to find any documentation that would tell me how to use that table. All the documentation that I have come across has only told to use the table but never mentioned how.

Please do help me if you know how to use the table it will be greatly appreciated.

Thanks,
Sahil

@DanBloomberg
Copy link
Owner

Sorry, I don't know anything about jbig scaling tables, and did not find out by a simple google search.

Leptonica has many functions for downscaling, and you should in particular look at those in scale1.c.
If you wish, please furnish links to the jbig scaling functions that you mention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants