JBig2 Image compression for music

Moderator: kcleung

Post Reply
horndude77
active poster
Posts: 293
Joined: Sun Apr 23, 2006 5:08 am
notabot: YES
notabot2: Bot
Location: Phoenix, AZ

JBig2 Image compression for music

Post by horndude77 »

Talking about OMR got me thinking about image compression tailored for pages of music. JBig2 works by classifying segments on an image as being alike. In this way it can store what an 'e' looks like once and then just store every place on the page where there's an 'e'. So it works great for text, but I'd imagine it's not optimal for music because everything is stuck together. One of the steps of OMR is staff line removal. Another removes vertical lines. We could build up 3 separate images: horizontal lines, vertical lines, everything else. The JBig2 classifier could be run on each of these and then the results combined back into one image. I'm curious if this would yield smaller output files since now most stuff on the page is separated. Most noteheads for example would look almost identical and would be stored once.

It'd be interesting to look into because most modern PDF viewers can already read JBig2 encoded images. Only the encoding step would be different. Does this look like it has potential? Anyone know if this is feasable with JBig2?
Carolus
Site Admin
Posts: 2249
Joined: Sun Dec 10, 2006 11:18 pm
notabot: 42
notabot2: Human
Contact:

Re: JBig2 Image compression for music

Post by Carolus »

A real, working OMR is sort of the Holy Grail. I had some engravers I work with conduct a test a couple of years ago using SharpEye, PhotoScore and SmartScore using some fairly routine items (like vocal scores for Bach Canatas, piano music, etc.). They were all fairly decent prints of decent German engravings (no 19th century French scores with inverted 8th rests for quarter rests, etc.). The best result achieved was around 65% - far too low to be acceptable.

I've wonder if vectorizing the scanned scores would be a possibility. Adobe had a program called Streamline years ago that had some fairly advanced features for converting raster images into vector. If nothing else, it would allow images to have genuinely horizontal staff lines instead of the skewed unevenly images one encounters so often. One might also be able to fill in broken staff lines, missing sections of clefs, etc. - making a Bach-Gesellschaft score look as good as a print taken directly from the original plates.
horndude77
active poster
Posts: 293
Joined: Sun Apr 23, 2006 5:08 am
notabot: YES
notabot2: Bot
Location: Phoenix, AZ

Re: JBig2 Image compression for music

Post by horndude77 »

Yeah, I'm not thinking about a full fledged OMR. Just a way to compress scans of music better while still being identical pixel for pixel to the original. Certainly going all the way and vectorizing as much as possible (staff lines, stems, note heads, bar lines, etc.) would compress even more efficiently. This wouldn't be identical to the original scan, but if it worked well it could potentially clean some things up.

General vectorize algorithms like adobe's or stanford's don't work well on music (I've tried). It would need to be tailored specifically to music to be acceptable I'd imagine. So it would need to determine the parameters for music objects (staff line widths, between staff space, note head width, etc.) then use this sort of information to vectorize.
Post Reply