Archived copy.
This page was recovered from the Internet Archive snapshot of
/display/REQ/Identify Shifted Crop Issue in JPEG2000 taken on 2011-10-08.
The original wiki at wiki.opf-labs.org is being decommissioned.
Identify Shifted Crop Issue in JPEG2000
| Title | Identify Shifted Crop Issue in JPEG2000 |
| Detailed description | A detailed description of the Solution. Feel free to include links to further information (eg. OPF blog posts!). Note that a Solution is a specific digital preservation application of a software tool or tools. It might for example be a scripted tool, or a myExperiment workflow Due to the ramp up cost of working with j2 files, quite a few things were tried and then alternatives looked at. (jj2000, and an applet to present j2 in a web browser) (modifying j2structCheck.py for reading j2s) (using imagemagick to auto-crop or image process, and convert between formats) To avoid time constraints, a sample set of pngs was generated. (Open the j2 in irfanView, crop to a left hand band - export to png, crop the png to a 256x512 sample section) === 1) Sample file set 1a) 3 known bad files (png 256x512) 1b) 3 assumed good files, cropped on a good section (png 256x512) === 2) Primary ideas 2a) run a vertical diff (edge detection), and examine the output for potential for thresholding 2b) do a vertical band side by side comparison, and look for anomalies in the output 2c) is any horizonal averaging helpful 2d) taking a vertical crop is probably the best way the optimise the detection algorithm, and the crop could be further divided which gives quicker read-time, scan-time, and also makes it easier to isolate the part of the image affected. === 3) Fiji imageJ 3a) this is surprisingly quick to get up and running. 3b) unfortunately there is no obvious support for the algorithms proposed (this would be a simple matter of programming) |
| Solution Champion | Who owns the Solution? Include an email address if possible |
| Corresponding Issue(s) | A bulletted list of links to Issues to which this provides a Solution Shifted Crop Corruption |
| Tool/code link | A link to code on Git hub or a corresponding myExperiment |
| Tool Registry Link |
If possible provide a link to information about any third party tools used. Ideally these should point to entries in the OPF Tool Registry |
| Evaluation | Dev: Potentially useful techniques to identify the bad images using image processing techniques. Dev: Chopping image down to edges may be useful optimisation. Needs further investigation. |
The three assumed good png images: DUCR-1886-04-03-0001_256x512.png YOHD-1881-10-10-0005_256x512.png MOPT-1897-10-07-0003_256x512.png


The three known bad png images: DUCR-1896-10-31-0001_256x512.png DUCR-1896-10-31-0007_256x512.png DUCR-1896-10-31-0003_256x512.png 


Fiji (imageJ) using local thickness from Analyze:
Fiji (imageJ) using Edge Detection:
Fiji: trying out a variety of other things - eigen values look promising (as does the "find differences" plugin)