fscn - miun.se

37
Rapportserie FSCN - ISSN 1650-5387 2007:48 FSCN-rapport R-07-76 Örnsköldsvik 2007 InkCognito Matlab simulation of printers Version 1.0 FSCN Fibre Science and Communication Network - ett skogsindustriellt forskningsprogram vid Mittuniversitetet Jerker Wågberg

Upload: others

Post on 02-Feb-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FSCN - miun.se

Rapportserie FSCN - ISSN 1650-5387 2007:48FSCN-rapport R-07-76

Örnsköldsvik 2007

InkCognitoMatlab simulation of printers

Version 1.0

FSCNFibre Science and Communication Network

- ett skogsindustriellt forskningsprogram vid Mittuniversitetet

Jerker Wågberg

Page 2: FSCN - miun.se

       

       

INKCOGNITO MATLAB SIMULATION OF PRINTERS

VERSION 1.0

Jerker Wågberg  

More Research Örnsköldsvik DPC‐Digital Printing Centre, Örnsköldsvik 

FSCN ‐ Fibre Science and Communication Network  Mid Sweden University SE‐891 18 Örnsköldsvik 

Sweden       

ISSN 1650‐5387 2007:48 FSCN rapport R‐07‐76:, Mid Sweden Universtity 

January 2007  

Page 3: FSCN - miun.se

InkCognito

Matlab simulation of printers

Version 1.0

Di

Jerker Wågberg

gital Printing Center

Page 4: FSCN - miun.se

Inkcognito 1

1. INTRODUCTION ...........................................................................................2 2. INSTALLATION .............................................................................................3

Install as a Matlab application ...........................................................................3 Install as a stand-alone application ...................................................................4

3. OVERVIEW ...................................................................................................5 4. What is simulated? ........................................................................................7

Inkjet mode........................................................................................................7 Offset mode.......................................................................................................9 Halftoning ........................................................................................................10

5. InkCognito control window...........................................................................11 Menu toolbar ...................................................................................................11 Tabbed pane control .......................................................................................12

Media Pane..................................................................................................12 Setup Pane..................................................................................................14 Control Pane................................................................................................15

InkCognito Toolbar ..........................................................................................16 Figure windowcontext menus..........................................................................17 Matlab camera toolbar.....................................................................................17 Animation toolbar ............................................................................................17

6. Using the InkCognito calculation engine......................................................21 Data structures ............................................................................................21

mediaex...........................................................................................................24 printspecex......................................................................................................25 penprint ...........................................................................................................26 ijprint................................................................................................................27 layerprint .........................................................................................................28 offsetprint ........................................................................................................30 printgamut .......................................................................................................32

7. Appendix 1: Data structures ........................................................................33

The InkCognito software package was written by Jerker Wågberg, More Research and DPC – Digital printing Center, as a part of the project Interaction between ink and paper, a project sponsored by the Knowledge Foundation, Sweden. The software is not free and may not be copied without the consent of DPC and other project members.

Page 5: FSCN - miun.se

Inkcognito 2

1. INTRODUCTION

InkCognito is a MATLAB package for calculating reflectances of prints using

Kubelka-Munk equations. It can be used for simulating inkjet printing as well as

offset printing. In InkCognito, inkjet printing is assumed to have the inks pene-

trating the substrate, whereas for offset printing, the inks are assumed to be

layered on top of each other, without penetration. Two different halftoning stra-

tegies can be used, dot-on-dot and dot-off-dot or any combination thereof in a

continuous scale.

With some restrictions, specifically dot-off-dot printing, InkCognito can be used

with any number of inks. It is quite feasible to simulate a future printer having so-

called spectral inks.

InkCognito can calculate the reflectances for any combination of inks. Color

gamuts can be visualized and calculated for any number of inks as long as the

inks are specified so that the locus of an a* vs. b* plot of full tone patches form a

convex curve.

The main use of the package is however not to precisely calculate the reflectan-

ces, but more to be used a learning tool. The program makes heavy use of

Matlab 3D graphics and every change in the parameters is instantly visualized.

This makes the package ideal for "what-if" tests that can inspire to new ideas and

further investigations.

Results can be saved as a Matlab data file or exported to Excel. It is also pos-

sible to enter spectral data for media and inks in Matlab or Excel and import it to

InkCognito for testing.

It is possible to import measured color gamuts into InkCognito and compare

these gamuts with other imported or simulated gamuts.

InkCognito can also make live animations of the effect of parameter changes,

which can be saved in several file formats, for easy inclusion in e.g. a Power-

Point presentation.

Page 6: FSCN - miun.se

Inkcognito 3

2. INSTALLATION

2.1. System requirement InkCognito can either be run as a Matlab application or as a stand-alone applica-

tion. The standalone version requires at least Windows XP SP2 Professional. It

may run under other Windows versions, but this has not been tested.

The Matlab application version of InkCognito was developed under Matlab 7.2

(R2006a) under Windows XP Professional operating system. It might work with

earlier versions, but this has also not been tested.

2.2. Installation The software package is distributed in one executable file called setup.exe.

The Matlab application can be installed as an ordinary user with limited priviliges.

The stand-alone application, however, needs the user to be logged in with

power-user or administrative user rights, if this is the first stand-alone Matlab

application on this computer.

The file setup.exe is executed to start the installation of either the Matlab

application or the stand-alone application. Windows warns that the "publisher

could not be verified. Are you sure you want to run this software?" Click Run to

continue. After a click on Next in the initial welcome screen, there is an

opportunity to choose where the software is to be installed. After the location is

choosen, a drop-down menu gives the choice of selecting between Matlab or

standalone application. Select your preference and continue to click in respons to

the following questions, until the final Install is clicked.

The install process now diverges.

2.2.1. Install as a Matlab application

1. When the installation is finished, start Matlab.

Page 7: FSCN - miun.se

Inkcognito 4

2. Within Matlab, start pathtool, click the Add with Subfolders… button and

browse to the directory where you extracted InkCognito. Click OK.

3. Click Save if you want to have InkCognito available from here on, else click

Close.

2.2.2. Install as a stand-alone application If this is the first standalone Matlab application on the computer, the installation

goes into a rather lengthy procedure, where there are installations within

installations. The questions asked have rather obvious answers, except for a

warning that the dot-net framework is missing. This is expected, so click Yes to

disregard the warning.

InkCognito can now be started either with the icon on the desktop or from the

start menu.

The first time InkCognito is started, it will take some time before it actually starts,

since it will unpack some runtime routines. This is a one time only process and

the response time will be substatially lower the next time through.

Page 8: FSCN - miun.se

Inkcognito 5

3. OVERVIEW

When the initialization is completed, InkCognito is started by entering:

>> inkcognito

at the Matlab prompt, or, if standalone, starting inkcognito.exe. The screen

dump below shows a sample session when InkCognito is running.

Figure 1: Sample InkCognito session

To the left, a simulated L*a*b* gamut is shown in an ordinary Matlab figure

window and to the right is the InkCognito control window. By dragging the small

black rectangles in the horizontal scrollbars, the corresponding parameters are

changed and the result is simultaneously shown in the figure to the left. Instead

of dragging the scrollbar rectangles, it is also possible to enter the parameters

numerically into the textboxes adjacent to the scrollbars. By clicking on the figure

to the left, holding down the mouse button and moving the mouse, it is possible

to turn the gamut around, in order to view features that are hidden in the present

view.

Page 9: FSCN - miun.se

Inkcognito 6

It might be a good idea to start up InkCognito right now and try changing some

parameters, to get a feel for what can be done. It will make the following

concepts easier to understand. There is no risk of doing anything harmful to the

program, since it does not save any states between sessions.

Page 10: FSCN - miun.se

Inkcognito 7

4. What is simulated?

InkCognito uses Kubelka-Munk theory to calculate the resulting spectral

reflectance when adding inks onto a substrate. The substrate can be any

material, as long as it can be characterized by spectral light scattering and light

absorption coefficients, but since the substrate most often is a paper, this term is

used in this manual. The paper is assumed to have a backing, characterized by a

spectral reflectance. The inks can penetrate into the substrate but can not enter

the backing.

The mixtures of inks will the ones that make up the printer gamut. Any other

mixture will fall inside the printer's gamut. For this to work, the inks must be

specified in "color order", so that the locus in the chromaticity xy plane of

measured test patches printed with pure inks is strictly clockwise or anti-

clockwise and forms a convex polygon. This is always the case for CMY printers,

but when using more than three inks, the order and convexitivity is crucial.

InkCognito can simulate four different kinds of printing situations. The inks can

be assumed to penetrate into the substrate, or they can be printed on top of the

substrate and each other. This corresponds to inkjet printing and offset printing

respectively. Moreover, the print can be assumed to be printed with continuous

tone or halftone. With continuous tone, the inks are printed with arbitrary concen-

trations and the mixture of the inks determines the resulting color. With halftone,

the inks are printed with a fixed concentration, and different colors are achieved

by varying the area percentage of each participating ink. The four combinations

of 'inkjet – offset' and 'continuous tone – halftone' are shown schematically in fig

2 below. Ideally, all four prints would appear to have the same color.

4.1. Inkjet mode In Inkjet mode, the inks penetrate into the paper. The inks are assumed to

penetrate proportionally to the sum of the amount of inks. Since the inks can not

penetrate into the backing, there is an abrupt stop in penetration when the inks

hit the backing. The controls Pen Start and Pen End, control this penetration.

Page 11: FSCN - miun.se

Inkcognito 8

Continuous Halftone

Inkj

et

Offs

et

Figure 2: The four basic print modes supported by InkCognito. The figures show cross sections of papers that ideally would appear to have the same color. In the halftone column, the cross section is supposed to be through a single raster cell that is repeated to give the impression of a uniform color.

Pen Start sets the minimum penetration, that is, even the most minuscule

amount of ink is assumed to penetrate from the top down to Pen Start percent of

the paper. From then on, the penetration increases proportionally to the total

amount of inks, until it reaches the backing. The proportionality constant is calcu-

lated so that if only one ink where used, this ink would penetrate down to the Pen

End level when the specified maximum amount of ink is used. If another ink is

added, the penetration, for both inks, will continue with the same proportionality

constant. If the backing is reached, the penetration comes to a sudden stop.

The total amount of ink, i.e. the total sum of all inks, is set with the Tot Ink

control. Defining nInks as the number of inks in use and CurSum as the current

sum of ink amounts, the penetration, Pen, can be expressed with the equation

⎟⎟

⎜⎜

⎛+×

−= PenStartCurSum

nInksTotInk

PenStartPenEndPen ,100max (1)

Page 12: FSCN - miun.se

Inkcognito 9

4.2. Offset mode In offset mode, the inks are assumed to be completely on top of the paper, layer

by layer. This is in contrast to inkjet mode, where the inks are assumed to totally

mix within the paper. InkCognito will calculate the reflectance layer by layer,

starting from the backing.

The printing order of the inks can be altered by means of the Print Order control

in the Media panel, see fig 3.

Figure 3: Print order control. NB: The order is shown in actual print order. In the above case, Cyan is printed first, followed by Magenta

and then Yellow at the top

To change the print order, click on an ink to select it and then change its position

by pressing left or right cursor keys or click-and-drag it to wanted position. The

first ink shown is closest to the paper and the last is assumed to be closest to air.

Fig 4, below, depicts the situation for two different print orders.

Figure 4a: Print order example. Yellow ink is printed first.

Figure 4b: Print order example. Cyan ink is printed first.

Page 13: FSCN - miun.se

Inkcognito 10

Figure 5a: Dot-off-Dot printing Figure 5b: Dot-off-Dot printing

4.3. Halftoning There are two different halftoning methods, called dot-on-dot and dot-off-dot.

Dot-on-dot printing means that the inks are printed on top of each other and that

only one ink can be pure.

One other possibility is to place the second ink on to the paper area that still is

unprinted, as long as there is free area available. This is the dot-off-dot halftoning

method and both methods are shown for comparison in fig 5. If the inks where

ideal, in that they did not have overlapping absorption bands, both methods

would render the same reflectance on an average, but they do differ when the

inks overlap.

InkCognito can simulate both of these methods. It is even possible to have a

mixture between the two. The reflectance of a mixture between the two methods

is calculated as the sum of the reflectances multiplied with each percentage in a

Murray-Davies fashion.

Page 14: FSCN - miun.se

Inkcognito 11

5. InkCognito control window

The control window is made up of a top menu bar, a toolbar, a tabbed pane

control and a gamut volume indicator.

Menubar

Toolbar Gamut volume indicator

Tabbed pane control

Figure 6: Inkcognito control window

5.1. Menu toolbar It is possible to import and export data via the File menu. The File->Export menu

holds three options, Hull, Gamut and Media. Hull saves the current Lab

coordinates of the displayed hull, Gamut also saves the current hull, but also the

specification for the media and other settings that affect the size of the hull.

Finally, Media saves only the Media specification. See 6.1 Error! Unknown

switch argument. for a detailed description of what is contained in a

specification.

If data is saved as a Matlab .mat file, data is saved in structs as described in 6.1.

If an Excel .xls file is choosen, each struct is written into separate sheets, as is

the Lab data for the hull. All spectral data has the implied range 400 nm to 700

nm in 10 nm increments.

Hull, Gamut and Media can also be imported. If a hull is imported, the hull is

imported, the Lab values of the hull is displayed as a surface for comparison with

Page 15: FSCN - miun.se

Inkcognito 12

the current gamut. If a gamut or media is imported, data for the current is

replaced by data in the imported file.

Apart from .mat and .xls files, it is also possible to import a hull as ASCII CGATS

files. This is the format used by e.g. Gretag-MacBeth Spectrolino. the file is

assumed to contain measurements of 25x38 color patches and 25x2 gray-scaled

patches organized as in fig 7 below.

Figure 7a: Patch layout of first CGATS file Figure 7b: Patch layout of second CGATS file

The spectral readings of the patches are to be split into two files with the same

name, except for the last character in the base filename, which must be '1' and '2'

respectively. The patches are supposed to be measured starting at the top patch

and the measured downwards in column order. Although the grayscale patches

are not currently used by InkCognito, they must be present as place-holders.

5.2. Tabbed pane control The tabbed pane control has three tabs, Media, Control and Setup.

5.2.1. Media Pane In fig 6, the Media pane is shown. All basic media properties, that later can be

modified, are set in this pane. Each control is described separately in Table 2

below.

Page 16: FSCN - miun.se

Inkcognito 13

Table 1: InkCognito control pane controls

Property Description Backing Specifies the background of the print. The underlaying property is

the reflectance of the backing. Two predefines backings are supplied. DataCopy and Ideal. DataCopy holds the reflectance of a typical high white copy paper and Ideal has the reflectance of the perfectly reflecting diffusor, i.e. 100% in all reflectance bands

Back. % It is possible to reduce the reflectance spectrum of the backing by entering a value lower than the default 100%. A completely black backing can be simulated by entering 0%

Substrate Specifies the substrate used. The underlaying properties are the spectral light absorption, k, and light scattering, s, of the substrate. Two predefines substrates are supplied. DataCopy and Ideal. DataCopy holds the s and k of a typical high white copy paper and Ideal has both s and k set to zero.

Inks Specifies the light scattering and light absorption of the inks. Three real world inks are supplied, HP910, HP5550 and Offset. The Ideal*X ink sets are artificial inks that are created by dividing the visual spectrum in X parts and assigning each of the wavelength ranges to an ink. The Optimal ink set can be used to show that ideal inks are not always optimal, in that Optimal inks renders a larger color gamut than do Ideal*3.

The absorption spectra of the selected ink can be displayed by clicking the Ink

Balance button. A popup window with the relative absorption is displayed as in fig

8 below.

Page 17: FSCN - miun.se

Inkcognito 14

Figure 8: Ink Balance.

It is possible to change the balance between the inks by clicking and dragging

the bars in the figure.

The order in which inks are put onto the paper has effect for offset printing. It is

possible to simulate different print orders by clicking and dragging the small color

patches to the left of Print Order. The print order of a selected ink can also be

changed by pressing left and right arrow on the keyboard.

5.2.2. Setup Pane

Figure 9: Setup pane of command window.

In fig 9 above, the setup control pane is shown. It contains four properties,

Granularity, Range, Illuminant and Observer. Granularity governs the quality of

the plot of the gamut. A low Granularity value renders a rather coarse plot, while

a high value renders a plot with more details. However, there is a tradeoff

between quality and speed. Try to reduce the granularity if the plot updates

jerkily. The Granularity is reduced automatically when the number of inks is

increased to approximately keep a steady update rate.

The Range determines how much of the gamut is plotted. The default Full range

shows the complete gamut, while Upper only shows the upper part of the gamut,

i.e. where a maximum of two inks are used. Lower only renders the lower part of

the gamut where more than two inks are used.

The Illuminant can be any of the standard illuminants A, C,D50, D55, D65, D75,

E – the flat CIE illuminant – , F2, F7 or F11. The Observer can be any of the two

standard observers; the 1931 2º observer or the 1964 10º observer.

Page 18: FSCN - miun.se

Inkcognito 15

Above the panes, the total volume of the simulated gamut is shown. The unit is in

thousands of ∆E units. The volume is only shown for the Full range.

5.2.3. Control Pane

Figure 10: Control pane of command window.

The Control pane is the pane with the most controls as shown in fig 10 above.

Table 2: Control pane controls

Property Description Pen start Specifies were the penetration is supposed to start, even with

minute amount of ink.

Pen end Specifies on which depth the penetration ends when the maximum amount of ink is reached for one ink.

AbsPen Pen start and Pen end are normally specified as percentages of the substrates basis weight. If AbsPen is checked, they are instead specified as absolute readings in substrate basis weight units.

Substrate Holds the basis weight of the substrate.

%S Subs Changes the spectral light scattering coefficients of the substrates in a global fashion.

Page 19: FSCN - miun.se

Inkcognito 16

%K Subs Changes the spectral light absorption coefficients of the substrates in a global fashion.

Tot Ink Changes the total grammage of the applied ink. If there are three inks, the maximum amount of one is one third of the value entered here.

DotOnDot Holds the amount of dot-on-dot printing compared to dot-off-dot as explained in chapter Halftoning above.

InkJet Offset

Determines the major printing mode as described in What is simulated above

Continuous Halftone

Determines the minor printing mode as described in What is simulated above

5.3. InkCognito Toolbar

Figure 11: Command window toolbar

The InkCognito command window toolbar depicted above, holds tools that

controls the way the color gamuts are displayed in the figure window.

Table 3: InkCognito command window toolbar

Pins the control window to stay on top of all other windows, so that there is no need to "alt-tab" between the figure window and control window.

Takes a snapshot of the current parameter settings for use in an animation

When two or more snapshots have been taken, the program can interpolate linearly between the snapshots to make it easier to see changes to the color gamut.

Clears all the snapshots from the animation.

Refreshes the current plot.

Makes a copy of the current gamut and keeps it in the figure window for comparison with subsequent gamuts. Click the button again to clear the copy.

Page 20: FSCN - miun.se

Inkcognito 17

Displays the Rösch color solid as an Lab color gamut. Since this gamut is likely to completely envelop other gamuts, it is shown semi-opaque. Click the button again to delete the Rösch gamut.

When three inks are used, there is an option of showing the color gamut as a mesh plot, with the primary and secondary inks colored with their specific color.

5.4. Figure windowcontext menus When two or more color gamuts are displayed simultaneously it can be difficult to set them apart. By right-clicking the surface of one of the displayed color gamuts, it is possible to adjust the transparency of the surface and line color of the mesh of the object as in

Figure 12a: Opacity selections. Figure 12bums color selections.

5.5. Matlab camera toolbar

The Matlab camera toolbar, located at the top of the figure window, is used for

viewing the displayed color gamut from different viewpoints, see

http://www.mathworks.com/access/helpdesk/help/techdoc/visualize for further

documentation.

5.6. Animation toolbar It is easy to see how the color gamut changes when a property is changed by

means of the slider associated with the property, since the visual appearance

changes momentarily. However, it can be difficult to pinpoint how the gamut

Page 21: FSCN - miun.se

Inkcognito 18

changes between changes of two or more properties. In this case, the animation

feature of InkCognito can be used.

To set up an animation, click on the camera tool in the InkCognito toolbar. This

saves the state of the gamut internally. Go on by changing parameters and click

on the camera tool for each state of interest. To start the animation, click on the

triangular arrow, , in the InkCognito toolbar.

The color gamut reverts to the state of the first camera click, a new toolbar is

added at the top of the figure and a "time" axis is presented at the bottom, see fig

13.

Figure 13: Animation in InkCognito.

It is now possible to click and drag the white time axis and see how the gamut

changes between the two states. The change is smooth and can be stopped at

any point between saved states. The camera toolbar is still active, so that the

viewpoint can be shifted between animations. By clicking the Play tool, , in the

animation toolbar, the time axis moves smoothly by itself between the recorded

states. Again, the camera toolbar is still active, so that different viewpoints can be

Page 22: FSCN - miun.se

Inkcognito 19

set while the gamut is changing. The four tools to the left of the Play tool sets the

current state of the animation as described in the table below.

It is posiible to interpolate between more than two states by clicking on the

camera tool for every new state.

The Setup tool, , offers capabilities to change the duration of the animation,

from the first state to the last, as well as the frequency in frames per second. This

number might be higher than the achieved frame rate, depending on the

complexity of the plot.

When InkCognito is run under Matlab, animations can be saved as a Matlab .fig

file and later reloaded outside InkCognito as long as the Matlab search path to

InkCognito is active. Animations can also be saved as .gif or .avi files for use

outside Matlab. If the Microsoft WMV encoder, available at

http://www.microsoft.com/windows/windowsmedia/forpros/encoder/default.mspx,

is installed on the computer, it is also possible to save the animation as a .wmv

file. This file format is the most appropriate for inclusion into e.g. PowerPoint

presentations. Table 4 summarizes the animation commands.

Table 4:Animation toolbar tools

Save the animation as a .gif, .avi or .wmv file.

Toggle animation run.

Go to the first state of animation.

Go to previous state.

Go to next state.

Go to last state of animation.

Display animation setup dialog.

Use splines to smoothen the animation

Page 23: FSCN - miun.se

Inkcognito 20

Circle the animation, so that the first state is repeated after the last one.

Toggle visibility of time axis.

It is possible to make the states on the time axis more descriptive by writing a

short label instead of the default state numbers by double clicking on the state

number, write the new label and finally pressing the Escape key. The distance

between tick marks is automatically adjusted to display the new label without

overlapping other labels.

Page 24: FSCN - miun.se

Inkcognito 21

6. Using the InkCognito calculation engine

InkCognito is highly modular with three parts, gui, printgamut and showgamut.

The interfaces between these modules are narrow and well defined, making it

easy to replace a module or use the module in a stand-alone fashion.

Data are transferred between the modules by means of Matlab structs. The gui

gathers input from the user, packs them into structs, sends them to printgamut

for calculation of the reflectances and finally calls showgamut for visualization.

6.1. Data structures Input parameters to printgamut are mostly spectral readings of light scattering

and light absorption of parts pertaining to the print. They are divided into three

groups, Media, PrintSpec and HullSpec. Media holds all fixed properties for

backing, substrate and inks. PrintSpec specifies what type of printing is to be

simulated; inkjet – offset, continuous tone – halftone etc. and finally, HullSpec

specifies the number of points of the simulated gamut. The gui and showgamut

routines additionally uses PlotSpec, specifying how the gamut is to be visua-

lized.

Altogether, the following parameters are passed from the gui to the other routines

in form of the following structs:

Page 25: FSCN - miun.se

Inkcognito 22

Media

Backing

Rg Reflectance spectrum of backing

n Refraction index of backing

Substrate

s Light scattering spectrum of substrate

k Light absorption spectrum of substrate

w Grammage of substrate

n Refraction index of substrate

Inks

s Light scattering spectra of inks

k Light absorption spectra of inks

n Refraction index of inks

PrintSpec

DotOnDot Percentage dot-on-dot halftoning. 0 = dot-off-dot

Penetration How far the inks penetrate into the substrate

PrintMode Continuous tone or halftoning

PrintType Inks mix and penetrate into the substrate OR are not penetrating and prints in layers on top of substrate

PrintOrder In case of layered printing, specifies the print order of inks

TotInk Maximum grammage of to be used for each ink.

HullSpec

TonesPerHue How any tones per hue that are to be examined.

HuesPerPrimary How many hues to be examined between primary colors.

PlotSpec

PlotTypeSurf Plot can be either a surf-plot or a mesh-plot

EdgeColor Color of mesh lines

Page 26: FSCN - miun.se

Inkcognito 23

This data structure is maintained by the gui and passed along to printgamut for

calculation of the resulting reflectance. This reflectance, together with the

PlotSpec is then passed on to showgamut for visualization:

Media

showgamut

PlotSpec PrintSpec R HullSpec

GUI printgamut

More detailed description of the data structures can be found in Appendix 1.

6.2. Function descriptions In the following, the top level routines of InkCognito are documented.

Page 27: FSCN - miun.se

Inkcognito 24

mediaex Return sample media specification

Syntax mediaex

Description

mediaex returns a sample Media structure for test purposes. The returned structure defines a white background with CIE Whiteness 85 – No UV. The Substrate is defined as being equally white with a grammage of 100 g/m2. The inks are sample CMY inkjet inks.

The structure is defined as: Backing = struct( ... 'Rg', [79.2 81.7 84.8 85.8 86.8 87.2 87.5 87.6 87.7 87.7 ... 87.8 87.8 87.8 87.5 87.3 87.2 87.1 87.1 87.1 87.4 ... 87.7 88.5 89.5 90.0 90.6 91.0 91.4 91.5 91.7 91.8 91.9]); Substrate = struct( ... 's', [46.0 46.0 46.0 47.6 49.2 48.7 48.2 47.9 47.6 47.4 47.1 ... 46.8 46.4 46.2 46.0 45.7 45.5 45.3 45.0 44.7 44.4 ... 44.1 43.9 43.5 43.2 42.9 42.6 42.3 42.1 41.8 41.6], ... 'k', [1.26 0.95 0.63 0.56 0.49 0.46 0.43 0.42 0.41 0.41 0.40 ... 0.40 0.39 0.41 0.43 0.43 0.43 0.43 0.43 0.41 0.38 ... 0.33 0.27 0.24 0.21 0.19 0.17 0.17 0.16 0.15 0.15], ... 'w', 100); Inks = struct( ... 's', [3.9 3.3 2.9 2.8 2.6 2.3 2.1 1.9 1.7 1.7 1.7 ... 1.8 1.9 1.9 2.0 2.1 2.4 3.2 3.2 2.6 2.4 ... 2.3 2.4 3.1 3.2 2.4 2.2 2.0 1.7 1.3 1.1 ... ;3.9 3.3 2.9 2.8 2.6 2.3 2.1 1.9 1.7 1.7 1.7 ... 1.8 1.9 1.9 2.0 2.1 2.4 3.2 3.2 2.6 2.4 ... 2.3 2.4 3.1 3.2 2.4 2.2 2.0 1.7 1.3 1.1 ... ;3.9 3.3 2.9 2.8 2.6 2.3 2.1 1.9 1.7 1.7 1.7 ... 1.8 1.9 1.9 2.0 2.1 2.4 3.2 3.2 2.6 2.4 ... 2.3 2.4 3.1 3.2 2.4 2.2 2.0 1.7 1.3 1.1], ... 'k', [557 557 557 318 160 93 67 59 63 80 111 164 249 382 577 ... 860 1259 1796 2400 2956 3379 3681 3916 4033 3876 3443 ... 2943 2509 2053 1549 1230 ... ;819 819 819 816 859 965 1140 1383 1739 2156 2591 3074 ... 3544 3745 3648 3703 3948 3884 3041 1768 789 302 116 ... 46 17 4 0 0 0 0 0 ... ;3800 3800 3800 3640 3250 2761 2264 1760 1260 852 555 ... 348 213 129 76 45 27 16 11 8 6 2 0 0 0 0 0 0 0 0 0]); Media = struct( ... 'Backing', Backing, ... 'Substrate', Substrate, ... 'Inks', Inks);

See Also printgamut, ijprint, offsetprint, dondprint, doffdprint, penprint, layerprint,

Page 28: FSCN - miun.se

Inkcognito 25

printspecex Return sample printspec specification

Syntax printspecex

Description mediaex returns a sample PrintSpec structure for test purposes. The returned structure specifies continuous inkjet printing, using three inks, which all penetrate down to 40 percent when printing with their maximum of 3 g/m2. The penetration starts at 10 percent. Although not used in this configuration, it also specifies DotOnDot, PrintOrder.

The structure is defined as: struct( ... 'PrintOrder', [1 2 3], ... 'Penetration', [10 40], ... 'TotInk', [3 3 3], ... 'DotOnDot', 100, ... 'PrintType', 'inkjet', ... 'PrintMode', 'continuous' ... );

See Also printgamut

Page 29: FSCN - miun.se

Inkcognito 26

penprint Calculate reflectance of a pure Kubelka-Munk mixture

Syntax penprint(Media, wlim, mix, plim)

Description r=penprint(Media, wlim, mix, plim) will calculate the reflectance of a print where the amount of each ink can be varied continuously. The inks are assumed to totally mix and penetrate into the substrate.

Media is a struct that specifies the physical properties of the pertaining parts, see mediaex. In Media, the number of inks are specified. Defining the number of pertaining inks nInks, mix is an n-by-m-by-…-by-nInks array specifying the mixture of inks as how many parts of the total amount of each ink is used. The limit for each ink, i.e. the amount of ink the corresponds to 1 in mix, is specified in wlim, a row vector of size [1, nInks]. For a two-dimensional mix, the absolute amount of inks, w, is hence w=repmat(wlim, [size(mix,1) 1]) .* mix.

plim specifies the penetration of the inks. The inks are assumed to always penetrate plim(1) percent into the substrate and at mix=1, a single ink is supposed to have penetrated plim(2) percent. In between plim(1) and plim(2), the penetration is increased linearly. However, the penetration for a single ink is dependent of the other inks, so that if another ink also have mix=1, both inks are supposed to penetrate down to 2*plim(2) percent of the substrate. The penetration can not exceed 100 percent, so the penetration stops abruptly when 100 percent penetration is reached.

Example Find the Lab value of the fully saturated red color with 3 g/m2 of each ink, assuming that 3 g/m2 of a single ink penetrates the substrate down to 25% of its total thickness.

Media = mediaex; r = penprint(Media, [3 3 3], [0 25], [0 1 1]); lab=roo2lab(r,'D65/10') lab = 47.7095 45.3411 20.1499

See Also mediaex, layerprint

Page 30: FSCN - miun.se

Inkcognito 27

ijprint Calculate reflectance of a halftoned print where inks penetrate the substrate

Syntax ijprint(Media, wlim, mix, plim, mode)

Description r=ijprint(Media, wlim, mix, plim, mode) will calculate the reflectance of a print where the inks are applied in a binary fashion. Either there is a fixed grammage of ink in area or the area is left blank. Different tone values are created by varying the area of each pertaining ink. Inks are assumed to penetrate the substrate.

Media is a struct that specifies the physical properties of the pertaining parts, see mediaex. In Media, the number of inks are specified. Defining the number of pertaining inks nInks, mix is an n-by-m-by-…-by-nInks array, specifying the area proportions of inks to be calculated. wlim, sized [1 nInks], specifies the fixed grammage used for each ink.

plim specifies the penetration of the inks. Each ink is assumed to penetrate plim(2) percent into the substrate. plim(1) has no meaning with ijprint. The total penetration for a single ink is dependent of the other inks, so that if another ink also is printed, both inks penetrate down to 2*plim(2) percent of the substrate. The penetration can not exceed 100 percent, so the penetration stops at 100 percent

mode='add' specifies dot-on-dot printing, while mode='sub' specifies dot-on-dot printing.

Example Compare the Lab values of the faint red color [0 .5 .5], printed dot-on-dot and dot-off-dot. The ink amounts are 3 g/m2 of each ink, assuming that 3 g/m2 of a single ink penetrates the substrate down to 25% of its total thickness.

Media = mediaex; ron = ijprint(Media, [3 3 3], [0 40], [0 .5 .5], 'sub'); labon=roo2lab(ron,'D65/10'); roff = ijprint(Media, [3 3 3], [0 40], [0 .5 .5], 'add'); laboff=roo2lab(roff,'D65/10'); laboff-labon ans = -9.2872 10.5853 35.2369

See Also mediaex, layerprint

Page 31: FSCN - miun.se

Inkcognito 28

layerprint Calculate reflectance of a pure Kubelka-Munk layered construction

Syntax layerprint(Media, wlim, mix, order)

Description r= layerprint(Media, wlim, mix, order) will calculate the reflectance of a print where the inks are assumed to be printed in layers on top of the substrate and each other. It is assumed that the inks do not penetrate the substrate nor each other.

Media is a struct that specifies the physical properties of the pertaining parts, see mediaex. In Media, the number of inks are specified. Defining the number of pertaining inks nInks, mix is an n-by-m-by-…-by-nInks array specifying the mixture of inks as how many parts of the total amount of each ink is used. The limit for each ink, i.e. the amount of ink the corresponds to 1 in mix, is specified in wlim, a row vector of size [1, nInks]. For a two-dimensional mix, the absolute amount of inks, w, is hence w=repmat(wlim, [size(mix,1) 1]) .* mix.

order specifies the print order. The ink specified by order(1) is printed onto the substrate and order(nInks) is printed on top of all other layers. In the figure below, two sample print orders are shown, assuming that the inks are specified in CMY order in Media.Inks.

Order=[3 2 1] Order=[1 3 2]

Page 32: FSCN - miun.se

Inkcognito 29

Example Find the Lab values of the red color with 0.3 g/m2 of each ink, assuming a print order of CMY

Media = mediaex; r = layerprint(Media, [3 3 3], [0 .1 .1], [1 2 3]); lab=roo2lab(r,'D65/10') lab = 54.3704 51.9659 29.4953

See Also mediaex, penprint

Page 33: FSCN - miun.se

Inkcognito 30

offsetprint Calculate reflectance of a halftoned layered construction

Syntax offsetprint(Media, wlim, mix, order, mode)

Description r= offsetprint(Media, wlim, mix, order) will calculate the reflectance of a print where the inks are applied in a binary fashion. Either there is a fixed grammage of ink in area or the area is left blank. Different tone values are created by varying the area of each pertaining ink. It is assumed that the inks do not penetrate the substrate nor each other.

Media is a struct that specifies the physical properties of the pertaining parts, see mediaex. In Media, the number of inks are specified. Defining the number of pertaining inks nInks, mix is an n-by-m-by-…-by-nInks array, specifying the area proportions of inks to be calculated. The limit for each ink, i.e. the amount of ink the corresponds to 1 in mix, is specified in wlim, a row vector of size [1, nInks]. For a two-dimensional mix, the absolute amount of inks, w, is hence w=repmat(wlim, [size(mix,1) 1]) .* mix.

order specifies the print order. The ink specified by order(1) is printed onto the substrate and order(nInks) is printed on top of all other layers. In the figure below, two sample print orders are shown, assuming that the inks are specified in CMY order in Media.Inks.

Order=[1 2 3] Order=[2 1 3]

mode='add' specifies dot-on-dot printing, while mode='sub' specifies dot-on-dot printing.

Page 34: FSCN - miun.se

Inkcognito 31

Example Find the Lab values of the fully saturated red color with 3 g/m2 of each ink, occupying a total of 20% of the paper area, assuming a print order of CMY

Media = mediaex; r = offsetprint(Media,[3 3 3],[0 .1 .1],[1 2 3],'add'); lab=roo2lab(r,'D65/10') lab = 89.9522 3.8439 5.4940

See Also mediaex, penprint

Page 35: FSCN - miun.se

Inkcognito 32

printgamut Calculate reflectance of a simulated printer's gamut

Syntax printgamut(Media, PrintSpec, HullSpec)

Description printgamut will calculate the spectral reflectance of a simulated printers gamut. The printer is specified by means of the Media and PrintSpec parameters.

Media is a struct that specifies the physical properties of the pertaining parts, see mediaex.

PrintSpec specifies the type of printing that should be executed and some limitations the is to be set. It is a Matlab structure with following fields:

Field Description See also DotOnDot Percent dot-on-dot ijprint, offsetprint Penetration PenStart – PenEnd penprint PrintMode 'continuous' | 'halftone' penprint, layerprint PrintType 'inkjet' | 'offset' ijprint, offsetprint PrintOrder layerprint TotInk penprint,layerprint

HullSpec holds the specification of the hull that is to be calculated. For three inks, the hull is specified as number of hues between each primary and secondary hue, that is the colors CBMRYG, and the number of tone values from white down to the pure CBMRYG color. When there are more than three inks, this scheme can not be used. Instead, a scheme akin to the one used calculating the Rosch color solid is used, which guarantees that the whole printer gamut is calculated, assuming that the locus of the pure inks forms a convex polygon in the chromaticity xy plane.

printgamut can be seen as a switchboard for the other printing routines, that after having set an appropriate mixture for the specification, calls the correct routine for the actual reflectance calculation.

Example Show the gamut of the pure CBMRYG inks:

HullSpec = struct( ... 'HuesPerPrimary', 1, ... 'TonesPerHue', 2, ... 'Range', 'full'); r=printgamut(mediaex,printspecex,HullSpec); h=viewlab(roo2lab(r)); shading interp

Page 36: FSCN - miun.se

Inkcognito 33

7. Appendix 1: Data structures

Inks Field Description Size(s)

s Light scattering [1 1] [nInks 1] [nInks nBands]

k Light absorption [nInks nBands] n Refraction index [1 1] Substrate Field Description Size(s)

s Light scattering [1 1] [1 nBands]

k Light absorption [1 1] [1 nBands]

n Refraction index [1 1] w Grammage [1 1] Backing Field Description Size(s)

Rg Reflectance [1 1] [1 nBands]

n Refraction index [1 1] Media Field Description Size(s) Backing struct Backing [1 1] Substrate struct Substrate [1 1] Inks struct Inks [1 1] HullSpec Field Description Size(s) TonesPerHue [1 1] HuesPerPrimary Integer [1 1] Range {'full' | 'lower' | 'upper'} string PrintSpec Field Description Size(s) DotOnDot Percent dot-on-dot [1 1] Penetration PenStart – PenEnd [1 2] PrintMode 'continuous' | 'halftone' string PrintType 'inkjet' | 'offset'

Page 37: FSCN - miun.se

Inkcognito 34

PrintOrder [1 nInks] TotInk [1 nInks] PlotSpec Field Description Size(s) PlotEdgeColor [1 3]