List Info

Thread: Glasgow progress update




Glasgow progress update
user name
2006-06-28 05:25:06
Still aiming for July 4th for some sort of a Glasgow
release, but we'll 
see. A lot left to do. Report below is for developers. No 
user-serviceable parts yet.

Been working on img_img, the command-line component of
Glasgow that's a 
little bit like GraphicsMagick 'convert'. Adding support
for SGI and DPX 
files. It had only PPM support lately (now broken). OpenEXR
and JPEG2000 
(Jasper) were working in the distant past and will get added
back later. 
Eventually all the file types now supported in CinePaint
will get added in.

Changes to the types and quantity of img_img channels. Now
number of 
channels is limited only by RAM and may be of mixed type.
The mixed 
types are particularly important to support OpenEXR without
crushing. 
OpenEXR may have Half, Float and U32 channels intermixed,
but CinePaint 
Film Gimp is homogeneous to channels (all channels in a
layer are either 
u8, u16, b16, f16, or f32 -- not mixed).

Channels in img_img have a color tag. RGB is considered a
single color 
in nomenclature because the colors aren't in separate
blocks that can be 
individually freed. The architecture will be able to copy
(convert) from 
channel color RGB to planar R,G,B channels with a library
call.

Here's what the types and colors are:

CHANNEL_TYPE(b16); //Binary 16-bit (HDR)
CHANNEL_TYPE(f16); //Float 16-bit (half)
CHANNEL_TYPE(f32); //Float 32-bit
CHANNEL_TYPE(f64); //Float 64-bit (double)
CHANNEL_TYPE(u8); //Unsigned 8-bit
CHANNEL_TYPE(u16);//Unsigned 16-bit
CHANNEL_TYPE(u32);//Unsigned 32-bit
CHANNEL_TYPE(u64);//Unsigned 64-bit
CHANNEL_TYPE(vec);//Vector data (not raster)

CHANNEL_COLOR(r); //Red
CHANNEL_COLOR(g); //Green
CHANNEL_COLOR(b); //Blue
CHANNEL_COLOR(m); //Mono
CHANNEL_COLOR(z); //Depth
CHANNEL_COLOR(rgb); //RGB interleave
CHANNEL_COLOR(rgba);//RGBA interleave

Here's the channel structure:

struct ImgChannel
{	DL_node node; // channel's node in channel list
	unsigned image; // image #, the first image is 0
	unsigned layer; // layer #, the first layer is 0
	ChannelType channel_type; // e.g., img_type=img_type_u8
	ChannelColor channel_color; // e.g.,
img_color=img_color_rgb
	unsigned x; // position in layer, e.g., 0
	unsigned y; // position in layer, e.g., 0
	unsigned width; // width in pixels, e.g., 720
	unsigned height; // height in pixels, e.g., 480
	unsigned bit_depth; // depth in bits, e.g., 8
	ByteData data; // raster or other image data
	StringData metadata;// text data about channel
};

An image object is a list of channels. The channel list is
flat. There 
isn't an image or layer list in the image file container.
The image # 
and layer # are simple attributes on the channel. The image
# is for 
file formats that may contain more than one image.

Cheers,

Robin
--
CinePaint


Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cinepaint-developers mailing list
Cinepaint-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ci
nepaint-developers
Glasgow progress update
user name
2006-06-28 05:54:15
Am 27.06.06, 22:25 -0700 schrieb Robin Rowe:

> Channels in img_img have a color tag. RGB is considered
a single color 
> in nomenclature because the colors aren't in separate
blocks that can be 
> individually freed. The architecture will be able to
copy (convert) from 
> channel color RGB to planar R,G,B channels with a
library call.

Thats great.
 
> Here's what the types and colors are:
> 
> CHANNEL_TYPE(b16); //Binary 16-bit (HDR)
> CHANNEL_TYPE(f16); //Float 16-bit (half)
> CHANNEL_TYPE(f32); //Float 32-bit
> CHANNEL_TYPE(f64); //Float 64-bit (double)
> CHANNEL_TYPE(u8); //Unsigned 8-bit
> CHANNEL_TYPE(u16);//Unsigned 16-bit
> CHANNEL_TYPE(u32);//Unsigned 32-bit
> CHANNEL_TYPE(u64);//Unsigned 64-bit
> CHANNEL_TYPE(vec);//Vector data (not raster)

The vector format could later be used for masks too?
 
> CHANNEL_COLOR(r); //Red
> CHANNEL_COLOR(g); //Green
> CHANNEL_COLOR(b); //Blue
> CHANNEL_COLOR(m); //Mono

Is Mono meant as gray?

> CHANNEL_COLOR(z); //Depth
> CHANNEL_COLOR(rgb); //RGB interleave
> CHANNEL_COLOR(rgba);//RGBA interleave
> 
> Here's the channel structure:
> 
> struct ImgChannel
> {	DL_node node; // channel's node in channel list
> 	unsigned image; // image #, the first image is 0
> 	unsigned layer; // layer #, the first layer is 0
> 	ChannelType channel_type; // e.g.,
img_type=img_type_u8
> 	ChannelColor channel_color; // e.g.,
img_color=img_color_rgb
> 	unsigned x; // position in layer, e.g., 0
> 	unsigned y; // position in layer, e.g., 0
> 	unsigned width; // width in pixels, e.g., 720
> 	unsigned height; // height in pixels, e.g., 480
> 	unsigned bit_depth; // depth in bits, e.g., 8
> 	ByteData data; // raster or other image data
> 	StringData metadata;// text data about channel
> };

ChannelColor is someting of red, green and so on? Will it be
possible to 
call a ChannelColor arbitrary to handle colour by a module.
The fixed 
RGB[A] layout in the legacy code was handled by many
exceptions in the 
code, for instance for Cmyk.

Can StringData become a list? I expect images can have many
attachments.
Probably I confuse here with the image struct.

> An image object is a list of channels. The channel list
is flat. There 
> isn't an image or layer list in the image file
container. The image # 
> and layer # are simple attributes on the channel. The
image # is for 
> file formats that may contain more than one image.

Thanks

kind regards
Kai-Uwe Behrmann
                                + development for color
management 
                                + imaging / panoramas
                                + email: ku.bgmx.de
                                + http://www.behrmann.name


Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cinepaint-developers mailing list
Cinepaint-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ci
nepaint-developers
Glasgow progress update
user name
2006-06-28 07:33:07
Kai-Uwe,

> The vector format could later be used for masks too?

Yes. Roto, too.

> Is Mono meant as gray?

Yes, 'g' was taken by green.  But, as
you mention it I see that 'm' 
really should be 'k' since that means black.

CHANNEL_COLOR(c);//Cyan
CHANNEL_COLOR(m);//Magenta
CHANNEL_COLOR(y);//Yellow
CHANNEL_COLOR(k);//Black
CHANNEL_COLOR(cmyk);//CMYK Interleave

> ChannelColor is someting of red, green and so on? 

Yes. ChannelColor is just a tag for what the color layout
is.

 > Will it be possible to
> call a ChannelColor arbitrary to handle colour by a
module. 

Yes. A ChannelColor is no different in concept than
bit-depth. It tells 
you what you're dealing with (and there will be library
calls to do 
common conversions). If you try to hand an XYZ channel to a
file writer 
that expects RGB it may be unable to write it. If you hand
CMYK to the 
TIFF writer that should know what to do. An outside helper
module could 
be able to convert XYZ to RGB, etc.

Every sub-channel in a channel is expected to have the same
bit-depth 
and strlen(channel_color) is expected to be the # of
sub-channels. Aside 
from that you could assign any string to a ChannelColor,
such as "hsv".

> Can StringData become a list? I expect images can have
many attachments.
> Probably I confuse here with the image struct.

Yes, it's a list. The raw data is field-value tag
attributes in this format:

<field>=<value>\n
.
.
.

Example:

First Name=Robin\n
Last Name=Rowe\n
<EOF>

 From a code standpoint it will look something like this:

   Metadata md;
   md.Read(filename);// or something like that
   cout<<md["First
Name"]<<endl;//"Robin"
   md["First Name"]="Kai-Uwe";
   md.Delete("Last Name");
   md["Country"]="Germany";
   md.Write(filename);

File output:

First Name=Kai-Uwe\n
Country=Germany\n
<EOF>

The metadata code isn't built yet but coming soon. It's
how I'm going to 
implement the AppRc settings code to simplify it from the
GIMP "Scheme" 
that the Glasgow team reused.

Cheers,

Robin
--
CinePaint

Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cinepaint-developers mailing list
Cinepaint-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ci
nepaint-developers
Glasgow progress update
user name
2006-06-28 08:36:33
Robin,

hope it is ok to go into more details.

Am 28.06.06, 00:33 -0700 schrieb Robin Rowe:

> Yes, 'g' was taken by green.  But, as
you mention it I see that 'm' 
> really should be 'k' since that means black.
> 
> CHANNEL_COLOR(c);//Cyan
> CHANNEL_COLOR(m);//Magenta
> CHANNEL_COLOR(y);//Yellow
> CHANNEL_COLOR(k);//Black
> CHANNEL_COLOR(cmyk);//CMYK Interleave

Oh, I just remember about a naming sheme like: CcMmYKk for
my 7 channel 
printer. So could you make a normal Cmyk channel upercase
please?
For spectral data the wavelength should suffice:
  360-780,20nm ; 360 ; 380 ; 400 ... 780


As you avoid a hirarchical sheme, which channel tells about
the layout? 
The first one?
like in the following example:

  ImgChannel channellist;

  channellist[0]->channel_color == img_color_rgb // empty
or red?
  channellist[1]->channel_color == img_color_r   // red
  channellist[2]->channel_color == img_color_g   // green
  channellist[3]->channel_color == img_color_b   // blue


> > Can StringData become a list? I expect images can
have many attachments.
> > Probably I confuse here with the image struct.
> 
> Yes, it's a list. The raw data is field-value tag
attributes in this format:
> 
> <field>=<value>\n
> .
> .
> .
> 
> Example:
> 
> First Name=Robin\n
> Last Name=Rowe\n
> <EOF>
> 
>  From a code standpoint it will look something like
this:
> 
>    Metadata md;
>    md.Read(filename);// or something like that
>    cout<<md["First
Name"]<<endl;//"Robin"
>    md["First Name"]="Kai-Uwe";
>    md.Delete("Last Name");
>    md["Country"]="Germany";
>    md.Write(filename);
> 
> File output:
> 
> First Name=Kai-Uwe\n
> Country=Germany\n
> <EOF>
> 
> The metadata code isn't built yet but coming soon.
It's how I'm going to 
> implement the AppRc settings code to simplify it from
the GIMP "Scheme" 
> that the Glasgow team reused.

Nice.
And Binary data will be attachable as well for all sorts of
things? Of 
course I'm thinking about additional profiles used for
instance by 
external plug-ins on a per image basis. Other data are
imaginable as well.

regards
Kai-Uwe Behrmann
                                + development for color
management 
                                + imaging / panoramas
                                + email: ku.bgmx.de
                                + http://www.behrmann.name


Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cinepaint-developers mailing list
Cinepaint-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ci
nepaint-developers
Glasgow progress update
user name
2006-06-28 17:11:45
Kai-Uwe,

> Oh, I just remember about a naming sheme like: CcMmYKk
for my 7 channel 
> printer. So could you make a normal Cmyk channel
upercase please?

I don't understand. What difference could it make?

> For spectral data the wavelength should suffice:
>   360-780,20nm ; 360 ; 380 ; 400 ... 780

Each ChannnelColor would be assigned a one-letter mnemonic.
It's pretty 
hard for me to imagine a real format that would have 18
interleaved 
subchannels. Seems a bit much! Let's say it has five bands
interleaved, 
with ChannelColor "12345".

Then in metadata it could say what the bands mean:

Band 1=360nm\n
Band 2=380nm\n
Band 3=400nm\n
Band 4=420nm\n
Band 5=440nm\n

 > The first one?
 > like in the following example:
 >
 >   ImgChannel channellist;
 >
 >   channellist[0]->channel_color == img_color_rgb //
empty or red?
 >   channellist[1]->channel_color == img_color_r   //
red
 >   channellist[2]->channel_color == img_color_g   //
green
 >   channellist[3]->channel_color == img_color_b   //
blue

No. One or the other, not both.

RGB (img_color_rgb):

RGBRGBRGBRGBRGBRGBRGBRGBRGB...

R,G,B (img_color_r, img_color_g, img_color_b):

RRRRRRRRRRRRRRRRRRRRRRRRRRR...
GGGGGGGGGGGGGGGGGGGGGGGGGGG...
BBBBBBBBBBBBBBBBBBBBBBBBBBB...

It's possible, but twisted, to have a channel RGB and a
channel R in the 
same layer. That would be like having two R channels in the
same layer.

What may seem confusing is that interleave is considered to
be a single 
channel despite its subchannels. A channel is not
necessarily a single 
color but is an atomic block of memory. You can't delete a
subchannel R 
or move it to another layer without deleting the entire RGB
channel. A 
planar R channel can be severed from R,G,B.

If you have R,G,B you can add an alpha channel directly, but
you'll have 
to copy it if you want RGBA interleaved instead of R,G,B,A
planar.

That code isn't written yet, but like this:

// Copy RGB interleave to new R,G,B planar channels in same
layer:
CloneToPlanar(channel_list,channel_rgb);
// Get rid of duplicate data:
Delete(channel_list,channel_rgb);
// (channel_list contains channel_r, channel_g, channel_b)
// Changed mind, clone again to undo:
CloneToInterleave(channel_list,channel_r,3);
Delete(channel_list,channel_r,3);
// (channel_list contains channel_rgb)

> As you avoid a hierarchical scheme, which channel tells
about the layout? 

Every channel indicates layout. Channels are an ordered list
0..n. Layer 
is just a tag.

There's no overloaded operator[] presently because it makes
more sense 
to walk the list with an iterator, but if there was:

// All channels start out as being in layer 1 implicitly:
channel_list[0]->channel_color=img_color_c;
channel_list[1]->channel_color=img_color_m;
channel_list[2]->channel_color=img_color_y;
channel_list[3]->channel_color=img_color_k;
// To make layer 1 channel 4 be layer 2 channel 1:
channel_list[3]->layer=1;

Example metadata:

Layer 1=background\n
Layer 2=black mask\n

> And Binary data will be attachable as well for all
sorts of things? Of
> course I'm thinking about additional profiles used for
instance by 
> external plug-ins on a per image basis. 

If the profile is a file then its path could go in metadata.
If it's an 
embedded blob, that would be another channel in data
(img_color_p?). 
Metadata is always text.

Robin
--
CinePaint

Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cinepaint-developers mailing list
Cinepaint-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ci
nepaint-developers
Glasgow progress update
user name
2006-06-28 21:57:30
Robin,

Am 28.06.06, 10:11 -0700 schrieb Robin Rowe:

> Kai-Uwe,
> 
> > Oh, I just remember about a naming sheme like:
CcMmYKk for my 7 channel 
> > printer. So could you make a normal Cmyk channel
upercase please?
> 
> I don't understand. What difference could it make?

For inkjet printing are two cyan channels possible, a
saturated and a 
light cyan ink. 'C' could be used for the saturated and
'c' for the 
light ink channel. The same applies to magenta and key
black. 
If you dont like the above one can name the channels in the
metadata, 
which should work too and could be extended to spot colours.

> > For spectral data the wavelength should suffice:
> >   360-780,20nm ; 360 ; 380 ; 400 ... 780
> 
> Each ChannnelColor would be assigned a one-letter
mnemonic. It's pretty 
> hard for me to imagine a real format that would have 18
interleaved 

Here is a example:
http://personalpages.manch
ester.ac.uk/staff/david.foster/Hyperspectral_images_of_natur
al_scenes_04.htmlhttp://personalpages.manchester.ac.uk/staff
/david.foster/Hyperspectral_images_of_natural_scenes_04.html


as well MetaCow from Mark Fairchild is a sample image.

> subchannels. Seems a bit much! Let's say it has five
bands interleaved, 
> with ChannelColor "12345".
> 
> Then in metadata it could say what the bands mean:
> 
> Band 1=360nm\n
> Band 2=380nm\n
> Band 3=400nm\n
> Band 4=420nm\n
> Band 5=440nm\n

Ok.

>  > The first one?
>  > like in the following example:
>  >
>  >   ImgChannel channellist;
>  >
>  >   channellist[0]->channel_color ==
img_color_rgb // empty or red?
>  >   channellist[1]->channel_color == img_color_r
  // red
>  >   channellist[2]->channel_color == img_color_g
  // green
>  >   channellist[3]->channel_color == img_color_b
  // blue
> 
> No. One or the other, not both.
> 
> RGB (img_color_rgb):
> 
> RGBRGBRGBRGBRGBRGBRGBRGBRGB...
> 
> R,G,B (img_color_r, img_color_g, img_color_b):
> 
> RRRRRRRRRRRRRRRRRRRRRRRRRRR...
> GGGGGGGGGGGGGGGGGGGGGGGGGGG...
> BBBBBBBBBBBBBBBBBBBBBBBBBBB...

Now I understand, channels was associated with colour in my
mind but is  
not a must there.

> Example metadata:
> 
> Layer 1=background\n
> Layer 2=black mask\n
> 
> > And Binary data will be attachable as well for all
sorts of things? Of
> > course I'm thinking about additional profiles
used for instance by 
> > external plug-ins on a per image basis. 
> 
> If the profile is a file then its path could go in
metadata. If it's an 
> embedded blob, that would be another channel in data
(img_color_p?). 
> Metadata is always text.

Ah, a exception, but satisfactory.


Additional features like
Subsampling (scaling) and pixel stretching will be declared
in the 
metadata block?

regards
Kai-Uwe Behrmann
                                + development for color
management 
                                + imaging / panoramas
                                + email: ku.bgmx.de
                                + http://www.behrmann.name


Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cinepaint-developers mailing list
Cinepaint-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ci
nepaint-developers
Glasgow progress update
user name
2006-06-29 00:40:11
Kai-Uwe,

> Here is a example:
> http://personalpages.manchester.ac.uk/staff/david.foste
r/
Hyperspectral_images_of_natural_scenes_04.html

I don't see where it specifies interleaved or planar. Is
that 
interleaved with 33 subchannels?

> Additional features like
> Subsampling (scaling) and pixel stretching will be
declared in the 
> metadata block?

Yes, anything that's text description can go in metadata.

Robin
--
CinePaint



Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cinepaint-developers mailing list
Cinepaint-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ci
nepaint-developers
Glasgow progress update
user name
2006-06-29 09:43:48
Robin,

Am 28.06.06, 17:40 -0700 schrieb Robin Rowe:

> > Here is a example:
> > http://personalpages.manchester.ac.uk/staff/david.foste
r/
> Hyperspectral_images_of_natural_scenes_04.html
> 
> I don't see where it specifies interleaved or planar.
Is that 
> interleaved with 33 subchannels?

I have not yet the file format spec. Maybe I find time to
dig a bit into 
this.

At least I know about the small MetaCow version. It is a set
of 76 16-bit 
gray scale tiffs :  380-7605nm .

regards
Kai-Uwe Behrmann
                                + development for color
management 
                                + imaging / panoramas
                                + email: ku.bgmx.de
                                + http://www.behrmann.name


Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cinepaint-developers mailing list
Cinepaint-developerslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ci
nepaint-developers
[1-8]

about | contact  Other archives ( Real Estate discussion Medical topics )