Обьявление джихада формату .SID :)

программа для загрузки и просмотра спутниковых снимков Земли, Луны, Марса предоставленных сервисами Google Maps и Космоснимки. Возможность работы с GPS приёмником.

Модераторы: Tolik, zed

Обьявление джихада формату .SID :)

Сообщение Parasite » 04 дек 2008, 11:58

Hi all.

Предлагаю обьявить интеллектуальный джихад и открыть брейн-шторм формату MrSID (.sid).

Несколько раскрою тему: данный формат является признанным профессиональным форматом хранения больших растровых изображений. Формат воспринимается серьезными современными ГИС-приложениями (в частности, ArcInfo). Формат является форматом со сжатием (настраиваемым пользователем) от более чем сильного - через "визуально-без-потерь" - вплоть до действительно "безпотерьного". Выигрыш в сравнении с ЖПЕГом на тех же файлах - около 10 раз в пользу .сид, при этом алгоритмы сжатия в данном формате не дают столь потрясающих искажений и артефактов, как в ЖПЕГе. Файлы данного формата без проблем смотрятся как на локалхосте, так и в интернете (при наличии плагина к браузеру), причем для просмотра файла не обязательна скачка его всего - достаточно браузеру запросить область, которую необходимо отобразить (без выкачивания всего тела файла). Данный формат много лет специально оптимизировался для хранения глобальных растров (в отличие от БМП\ТИФ\ЖПЕГ). При кодировании в .сид нет необходимости держать "в уме" весь битмап для его упаковки - в сам кодер уже встроены механизмы линейной потоковой сборки - при кодировании БМП-файла 8'000\10'000 в памяти отьелось кодером не более 20Мб, кодинг занял порядка 9 секунд, выходной файл получился 1.8Мб без видимых различий в качестве. Жпег же утоптал данный битмап в 13Мб (60% сжатия) за 6 секунд.
Итд прочие вкусности и фичи.

Данный формат является закрытым, информации в паблике по внутренней структуре крайне мало, и кодировщики в оный распространяются только на коммерческой основе и очень недешевы вследствие специфичности как формата, так и решаемых оным задач.

Я считаю, что данный формат ИДЕАЛЬНО подошел бы как выходной контейнер при склейке карт САСом. Все эти ТИФФ\БМП хоть и несколько решают задачу на определенном временном участке работы с картами, но являются полумерами - так как изначально не разрабатывались для хранения ДЕЙСТВИТЕЛЬНО глобальных растров. Самое большое что было утоптано лично мною в сид без каких-либо проблем и дополнительных вопросов - это 80'920\61'900 пикс (рассчетный график поперечных нагрузок на арочный мост).

На основании вышесказанного предлагаю прогрессивному сообществу устроить данному формату брейн-шторм с полной разборкой и описанием внутренней
структуры, и впоследствии применить результаты в САС. Этим ПОЛНОСТЬЮ и крайне НАДОЛГО решится вопрос лимитов выходных форматов как по размеру файла, так и по размеру утоптанного битмапа - а заодно выведет программу на качественно новый уровень (бо ни один из конкурирующих программ этот формат еще не осилили, насколько я знаю).

Прошу высказывать свои мысли ниже (по возможности конструктивно и не захламляя ветку). Примеры файлов могу предоставить по запросу, кому надо.
The only difference between me and a mad man is that I am not mad. /Salvador Dali/
Аватара пользователя
Parasite
Администратор
 
Сообщения: 4532
ICQ: 15819243
Зарегистрирован: 23 окт 2008, 17:38
Благодарил (а): 57 раз.
Поблагодарили: 214 раз.

Re: Обьявление джихада формату .SID :)

Сообщение feya » 04 дек 2008, 15:39

На сколько я в курсе ECW имеет почти те же самые возможности и назначения что и SID, эти форматы даже основаны оба если не ошибаюсь на Вейвлет преобразованиях не зря у обоих в SDK впридачу всунута поддержка JPEG2000. Узнать алгоритм сжатия в SID я думаю невозможно. А SDK как я понял токо на чтение.
http://SASGIS.ru | SAS.Планета | SASPlanet
Аватара пользователя
feya
Администратор
 
Сообщения: 2035
Зарегистрирован: 13 июл 2008, 10:45
Благодарил (а): 5 раз.
Поблагодарили: 30 раз.

Re: Обьявление джихада формату .SID :)

Сообщение Parasite » 04 дек 2008, 16:29

feya писал(а):На сколько я в курсе ECW имеет почти те же самые возможности и назначения что и SID, эти форматы даже основаны оба если не ошибаюсь на Вейвлет преобразованиях не зря у обоих в SDK впридачу всунута поддержка JPEG2000. Узнать алгоритм сжатия в SID я думаю невозможно. А SDK как я понял токо на чтение.

Совершенно верно. Внутри .sid иногда применяет JP2000 (но не ограничиваясь оным - формат кодировки доступен для выбора юзером при упаковке, их там несколько). Но JP2000 в сиде не в чистом виде - оно дополнительно завернуто именно в сид-структуру.

Разбирание этого всего зоопарка я и предлагаю общественности (включая и решение недоразумения с read-only). :)

PS: рабочий коммерческий кодер в .сид у меня есть. Любому желающему готов упаковать его тестовый битмап в .sid для опытов.
The only difference between me and a mad man is that I am not mad. /Salvador Dali/
Аватара пользователя
Parasite
Администратор
 
Сообщения: 4532
ICQ: 15819243
Зарегистрирован: 23 окт 2008, 17:38
Благодарил (а): 57 раз.
Поблагодарили: 214 раз.

Re: Обьявление джихада формату .SID :)

Сообщение Parasite » 09 дек 2008, 11:56

MrSID

MrSID (pronounced Mister Sid) is an acronym that stands for multiresolution seamless image database. It is a file format (filename extension .sid) developed and patented by LizardTech for encoding of georeferenced raster graphics, such as orthophotos.

Common uses

Geographic information systems
MrSID was developed primarily for Geographic Information Systems (GIS). With this format, massive image data can be partitioned and displayed as satellite imagery in map software.

World-wide web
Since MrSID files contain multiple scale and quality levels they are claimed to be well suited for streaming over the World Wide Web. Only the requested zoom and area of the image is sent to the browser making the drawing/navigating/viewing performance extremely fast. The MrSID (.sid) format is supported in all major GIS applications such as ESRI, ERDAS, Autodesk, MapInfo, Intergraph, and other product lines.

GeoExpress, the product that writes the MrSID format, can also generate JPEG 2000 (.jp2) data. When combined with LizardTech's Express Server, .sid and .jp2 data can be served quickly to a variety of GIS applications and other client applications either through direct integrations or via WMS (open source).

Software
LizardTech offers a software package called GeoExpress to read and write MrSID files. They also provide a free web browser plug-in. Most commercial GIS software packages can read MrSID files including those from GE Smallworld, ESRI, Intergraph, Bentley Systems, MapInfo, Safe Software, Autodesk and ERDAS IMAGINE.

There is no Open Source implementation of the MrSID format. Some Open Source GIS systems can read MrSID files, including MapWindow GIS and those based on GDAL. The Decode Software Development Kit (SDK) is made available as a free download from developer.lizardtech.com. This enables the capability to implement MrSID reading capability in any application.

Some image editing and management software systems can also read MrSID files; Xnview, IrfanView

Technology

Encoding
MrSID technology uses lossless wavelet compression to create an initial image. Then the encoder divides the image into zoom levels, subbands, subblocks and bitplanes. After the initial encoding, the image creator can apply zero or more optimizations. While 2:1 compression ratios may be achieved losslessly, higher compression rates are lossy much like JPEG-compressed data.

Decoding
MrSID uses selective decoding meaning that the decoder does not have to decode the entire file to view a specific zoom level, image quality or scene for example.

http://en.wikipedia.org/wiki/.sid
The only difference between me and a mad man is that I am not mad. /Salvador Dali/
Аватара пользователя
Parasite
Администратор
 
Сообщения: 4532
ICQ: 15819243
Зарегистрирован: 23 окт 2008, 17:38
Благодарил (а): 57 раз.
Поблагодарили: 214 раз.

Re: Обьявление джихада формату .SID :)

Сообщение Parasite » 09 дек 2008, 12:02

MrSID --- Multi-resolution Seamless Image Database

MrSID is a wavelet-based image compression technology which can utilise both lossy and lossless encoding. This technology was acquired in its original form from Los Alamos National Laboratories (LANL), where it was developed under the aegis of the U.S. government for storing fingerprints for the FBI. Now is is developed and distributed by the LizardTech, Inc.

This driver supports reading of MrSID image files using LizardTech's decoding software development kit (DSDK). This DSDK is not free software, you should contact LizardTech to obtain it (see link at end of this page). If you are using GCC, please, ensure that you have the same compiler as was used for DSDK compilation. It is C++ library, so you may get incompatibilities in C++ name mangling between different GCC versions (2.95.x and 3.x).

Latest versions of the DSDK also support decoding JPEG2000 file format, so this driver can be used for JPEG2000 too.

Metadata
MrSID metadata transparently translated into GDAL metadata strings. Files in MrSID format contain a set of standard metadata tags such as: IMAGE__WIDTH (contains the width of the image), IMAGE__HEIGHT (contains the height of the image), IMAGE__XY_ORIGIN (contains the x and y coordinates of the origin), IMAGE__INPUT_NAME (contains the name or names of the files used to create the MrSID image) etc. GDAL's metadata keys cannot contain characters `:' and `=', but standard MrSID tags always contain double colons in tag names. These characters replaced in GDAL with `_' during translation. So if you are using other software to work with MrSID be ready that names of metadata keys will be shown differently in GDAL.

Georeference
MrSID images may contain georeference and coordinate system information in form of GeoTIFF GeoKeys, translated in metadata records. All those GeoKeys properly extracted and used by the driver. Unfortunately, there is one caveat: old MrSID encoders has a bug which resulted in wrong GeoKeys, stored in MrSID files. This bug was fixed in MrSID software version 1.5, but if you have older encoders or files, created with older encoders, you cannot use georeference information from them.

Creation Options
MrSID writing is only supported if GDAL is built against a MrSID ESDK 5.x or newer. This is normally only licensed by Lizardtech under controlled circumstances (whereas the DSDK is free for anyone to use within the constraints of a license agreement). If you do have the ESDK, it can be used to write MrSID files. The following creation options are supported.

* WORLDFILE: Yes to write an ESRI world file (with the extension .sdw).
* VERSION: Can be 2 for MrSID version 2 files, or 3 for MrSID version 3 files.
* COMPRESSION: Used only for version 2 MrSID files. Indicates the desired compression ratio. MrSID generation 2 cannot compress an image losslessly; so zero does not indicate numerically lossless compression. A value of one may be used for highest fidelity, but a value of twenty will generally yield the best results (a "visually lossless" compression). Twenty would indicate a 20:1 compression ratio (the image would be compressed to 1/20 its original size).
* FILESIZE: Used only for version 3 MrSID files. Indicates the desired output file size in bytes. Use "0" for lossless compression.
* TWOPASS: Used only with 3 MrSID files. Indicates that a two pass optimizer algorithm should be used during compression.

http://gdal.org/frmt_mrsid.html
The only difference between me and a mad man is that I am not mad. /Salvador Dali/
Аватара пользователя
Parasite
Администратор
 
Сообщения: 4532
ICQ: 15819243
Зарегистрирован: 23 окт 2008, 17:38
Благодарил (а): 57 раз.
Поблагодарили: 214 раз.

Re: Обьявление джихада формату .SID :)

Сообщение Parasite » 09 дек 2008, 12:09

The Strange History of MrSID

According to the Los Alamos National Laboratory website, MrSID technology is based upon two Los Alamos inventions: MCICR and MrSID. Monte Carlo Image Conversion and Representation (MCICR) technology was developed at Los Alamos by Vance Faber, James White, and Jeffrey Saltzman, MCICR consists of two patented techniques for compressing 24-bit digital images into smaller 8-bit images without loss of resolution.

Multiresolution Seamless Image Database (MrSID) was developed by Jonathan Bradley through the Los Alamos laboratory's Sunrise Project funding. The combination of MCICR with MrSID produced image technology that became known as MrSID.

On January 9, 1992, LizardTech, formerly "Paradigm Concepts, Inc.", exclusively licensed MCICR from the Los Alamos National Laboratory. On October 25, 1995, LizardTech also exclusively licensed MrSID from the laboratory.

As described on the Laboratory's web site, "Before licensing Los Alamos' technologies, Paradigm Concepts, Inc. was a small service-based New Mexico company consisting of 4 employees. Since licensing MCICR and MrSID, the company has grown to 55 employees, including Bradley, Faber, and White - three of the original developers."

Also quoted on the Laboratory's web site was the then-President of LizardTech, John R. "Grizz" Deal, stating, "The creation of the MrSID technology could have only happened at the world's premier applied research institution, Los Alamos National Laboratory. Without MrSID, LizardTech would not be in business today."

According to news reports, LizardTech grew considerably after the above was written, and at its peak employed approximately 150 people. However, the company apparently never achieved a solid financial footing and spent considerable effort in an obnoxious legal action against Earth Resource Mapping, the company that created ECW, a competing image compression technology.

LizardTech was apparently trying to win in court what it could not accomplish in a competitive marketplace. The lawsuits failed, in some cases so miserably that courts ruled against LizardTech in summary judgments. Nonetheless, the legal actions consumed millions in legal fees. A further negative outcome was that LizardTech clouded the status of open standards like ECW and JPEG2000 with potential patent claims, however unfounded, and so caused unnecessary expense within the open source community as LizardTech's claims in court were examined, refuted and ultimately rejected.

Although LizardTech was reported to have raised over $44 million in venture capital money, by 2001 the company was already making massive layoffs, firing about half of its employees, with more layoffs in 2002 as well. It appeared to be well on its way to wasting a staggering amount of venture capital.

By 2003 LizardTech had managed to burn through millions of dollars of venture capital and was forced to fire almost all of its employees and sell the remaining assets to a Japanese company, Celartem Technology Inc. As of this writing, it remains to be seen if Celartem can revive MrSID despite the market preference for open technologies such as ECW and JPEG2000.

Why is MrSID Conversion and Import so Slow?

The incredibly slow functioning of the LizardTech mrsiddecode.exe program when converting MrSID images to an open standard like GeoTIFF appears to be yet another negative result of having to work with a seriously "closed" format like MrSID. Because the read/write technology inside the decoder is also closed, users are kept hostage by whatever inclination LizardTech may or may not have to improve the functioning of the decoder. Some critics have expressed the opinion that LizardTech has provided a deliberately slowed-down conversion utility to make it difficult to convert images from MrSID format to modern, open formats like ECW or JPEG2000.

Considering that LizardTech's historical strategy has been to maintain MrSID as a deeply closed format, it is obvious that LizardTech has every incentive not to try to speed up a decoder that allows people to free themselves from MrSID captivity. If anything, a cynic would point out that LizardTech would want to offer a decoder that works well enough for the company to say that MrSID can be converted to open formats but which works so poorly that as a practical matter few people will be able to use the decoder to free themselves from MrSID.

Contrast that situation to the much more open world of ECW or JPEG2000, where source code is easily available and as a result anyone who wants to contribute to improved performance can do so. As a result, both ECW and JPEG2000 provide at least four times faster performance in "native" compressed format applications and allow conversion to other formats using dramatically faster processes than made available by LizardTech.

The recommended Manifold strategy for dealing with MrSID is to first use the LizardTech decoder running in background to systematically convert MrSID format images into GeoTIFF and to then use Manifold to convert those GeoTIFF files into ECW format.

Many people have written scripts that can search through a folder or even a hard disk full of MrSID files and in background accomplish the above two-step process to convert those images into ECW. If accomplished in background, such as at night or during weekends, the tremendously slow process of getting images out of MrSID and into fast, modern formats like ECW can be done without the interactive pain of sitting and watching a conversion process taking forever. The resulting ECW images can be loaded into Manifold and viewed in seconds.

Such scripts are not a part of Manifold and so are not covered by this documentation. Use Google or search Manifold forums such as http://www.georeference.org and the archives of the Manifold-L discussion list to find links to pages that provide such scripts.

http://exchange.manifold.net/manifold/m ... _mrsid.htm
The only difference between me and a mad man is that I am not mad. /Salvador Dali/
Аватара пользователя
Parasite
Администратор
 
Сообщения: 4532
ICQ: 15819243
Зарегистрирован: 23 окт 2008, 17:38
Благодарил (а): 57 раз.
Поблагодарили: 214 раз.

Re: Обьявление джихада формату .SID :)

Сообщение Parasite » 09 дек 2008, 14:08

Предлагаю любителям поковыряться в данных несколько семплов в формате .sid (с приложением исходных картинок, из коих данные .sid и были получены). В каждом RARe - один "исходник" в формате ТИФ и один .sid из него.
Файлы black_XXXX и white_XXXX - изображения пустого черного либо белого квадрата соответственно, на месте XXXX - разрешение оригинала по пикселям.
Файлы photo_XXXX - полноцветное фотоизображение, на месте XXXX - разрешение оригинала по пикселям.
Все .sid были сконверчены с дефолтными настройками и 20:1 сжатием.

PS: по-прежнему предлагаю всем желающим присоединиться к разборке формата. Готов сконвертить присланную тестовую картинку в .sid любому желающему и/или заинтересованному в изучении стандарта.
Вложения
white_256x256.rar
(2.96 KiB) Скачиваний: 170
white_128x128.rar
(2.4 KiB) Скачиваний: 167
white_64x64.rar
(1.3 KiB) Скачиваний: 144
photo_256x256.rar
(86.46 KiB) Скачиваний: 171
photo_128x128.rar
(26.23 KiB) Скачиваний: 166
photo_64x64.rar
(9.45 KiB) Скачиваний: 162
black_256x256.rar
(1.2 KiB) Скачиваний: 159
black_128x128.rar
(1 KiB) Скачиваний: 161
black_64x64.rar
(963 байт) Скачиваний: 147
The only difference between me and a mad man is that I am not mad. /Salvador Dali/
Аватара пользователя
Parasite
Администратор
 
Сообщения: 4532
ICQ: 15819243
Зарегистрирован: 23 окт 2008, 17:38
Благодарил (а): 57 раз.
Поблагодарили: 214 раз.

Re: Обьявление джихада формату .SID :)

Сообщение svp » 09 дек 2008, 14:26

ИМХО: нереально.
Само по себе знание где что лежит ничего не даст. Там, наверняка, полно всякой математики для сжатия, которые долго думали крутые дядьки. Наивно полагать. что мы тут всё восстановим. Если это бесплатных кодеков ещё нет в сети, то уверен, что никто на этом форуме с задачей не справится. А если есть, то зачем справляться? Поискать библиотеку и подключить.
Аватара пользователя
svp
Советчик
 
Сообщения: 446
ICQ: 204094886
Зарегистрирован: 26 авг 2008, 11:14
Откуда: Белгород
Благодарил (а): 0 раз.
Поблагодарили: 1 раз.

Re: Обьявление джихада формату .SID :)

Сообщение Parasite » 09 дек 2008, 14:42

svp писал(а):Если это бесплатных кодеков ещё нет в сети, то уверен, что никто на этом форуме с задачей не справится. А если есть, то зачем справляться? Поискать библиотеку и подключить.

Вверху в постах, красными буквами. Существующий же фирменный DSDK дает функционал только на декодинг (читай - рид/онли). Кодер - за деньги (причем невменяемые).

PS: Но уж больно хорошо и качественно жмет, зараза....... Уже неплохо утоптанные жпеги добавочно жмет ЕЩЕ в три-четыре раза (только что из 8Мб ЖПЕГа сделал 2Мб сид, разницы в качестве на глаз - не вижу. Не было б тут ограничений на форуме - сюда бы вывалил для примера...).
The only difference between me and a mad man is that I am not mad. /Salvador Dali/
Аватара пользователя
Parasite
Администратор
 
Сообщения: 4532
ICQ: 15819243
Зарегистрирован: 23 окт 2008, 17:38
Благодарил (а): 57 раз.
Поблагодарили: 214 раз.

Re: Обьявление джихада формату .SID :)

Сообщение svp » 09 дек 2008, 15:06

Parasite писал(а):Вверху в постах, красными буквами. Существующий же фирменный DSDK дает функционал только на декодинг (читай - рид/онли). Кодер - за деньги (причем невменяемые).

Это я и имел виду. Если бы оно просто ломалось то кодер не стоил бы таких денег. Если бы оно вообще ломалось за разумное время я кол-во работы, то оно уже было бы сломано.
Так как я незнаком с форматом и с проблемой хранения глобальных растров, мои выводы:
Если в сети не встречатся бесплатных кодеров, значит:
1. Либо формат не так хорош (что врядли, если верить Вашим отзывам, а я верю).
2. Либо есть бесплатные или ломаные аналоги формата с тем или иным успехом его заменяющие (что тоже вряд ли, если учесть стоимость сида).
3. Либо формат нетривиальный, кругом обпотентованый и держится в глухой тайне, за разглашение коей инсайдерам грозит немалый срок (За это говорят характеристики формата, его явно промышленная, а не пользовательская, специализация, отсутствие ломаных кодеров в сети).

Кстати, насчёт отсутствия ломаных кодеров в сети я не уверен. Куда проще поломать готовый кодек, нежели разбираться в формате. И, поверьте, разобраться где в формате данные, а где инфва со свойствами картинки -- это одно, а научиться запаковывать данные неизвестным алгоритмом -- это совсем другое. Это, считай, равносильно придумать формат заново. Даже сложнее, ибо надо угадать как поступили те, кто его уже придумал. Хотя идея интуитивно понятна. Внутри наверняка реализована некая контейнерная сегментация со сквозной индексацией. Но дальше этого интуитивного понимания продвинуться нереально. Дешевле по трудозатратам на анализ будет, пожалуй, заработать денег на другом поприще и купить кодек=).
Это равносильно тому, чтобы написать архиватор располагая лишь архивами. Там полно очень сложной математики. Очень сложной. А здесь у нас собрались не математики=).
Так что если если я не переубедил Вас в нереальности поставленных целей, то поверьте, хотябы, что это не совсем тот форум=).
Аватара пользователя
svp
Советчик
 
Сообщения: 446
ICQ: 204094886
Зарегистрирован: 26 авг 2008, 11:14
Откуда: Белгород
Благодарил (а): 0 раз.
Поблагодарили: 1 раз.

След.

Вернуться в SAS.Планета

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 21

cron