NOVELTY - Producing hydrolysate containing sugar involves pretreating lingocellulosic biomass in pretreatment process to form slurry comprising cellulosic particles; saccharification of obtained slurry in presence of hydrolytic enzymes in an enzymatic hydrolysis process to obtain hydrolysate containing sugar; analyzing cellulosic particles present in slurry and/or cellulosic particles present in enzymatic hydrolysis process using an image analysis method to obtain a data set; and controlling process parameter of pretreatment process and/or enzymatic hydrolysis process in response to data set.    USE - For producing a hydrolysate containing sugar from a lingocellulosic biomass (claimed).    ADVANTAGE - The method is fast detection method which preferably can be used for continuous online or inline measurements; avoids time consuming manual sampling methods and subsequent laboratory analyses used for controlling process parameters in the prior art; is capable of saving and/or correcting an ongoing process; and is an online method.    DETAILED DESCRIPTION - Producing a hydrolysate containing sugar from a lingocellulosic biomass, involves: a) pretreating the lingocellulosic biomass in a pretreatment process to form a slurry comprising cellulosic particles; b) saccharification of the slurry obtained in step a) in the presence of hydrolytic enzymes in an enzymatic hydrolysis process to obtain a hydrolysate containing sugar; c) analyzing cellulosic particles present in the slurry obtained in step a) and/or cellulosic particles present in the enzymatic hydrolysis process during step b) using an image analysis method to obtain a data set; and d) controlling at least one process parameter of the pretreatment process in step a) and/or enzymatic hydrolysis process in step b) in response to the data set obtained in step c). An INDEPENDENT CLAIM is included for a system for the preparation of a hydrolysate containing sugar from a cellulosic starting material, comprising: i) a pretreatment arrangement for the preparation of a slurry comprising cellulosic particles from a cellulosic starting material, where the pretreatment arrangement comprises an inlet and an outlet; ii) an enzymatic hydrolysis reactor for saccharification of the slurry from the pretreatment comprising an inlet connected to the outlet of the pretreatment arrangement; iii) an image capturing device comprising a light source capable of emitting light in the visible spectrum, a camera lens and a digital camera capable of capturing an image in the visible spectrum; iv) an image processing device connected to the image capturing device and capable of processing data received from the image capturing device such that information about a size, shape and/or degree of darkness of the cellulosic particles can be obtained; and where the image capturing device is arranged to capture images of cellulosic particles present: in the slurry at a position in the connection between the outlet of the pretreatment arrangement and the inlet of the enzymatic hydrolysis arrangement; in a slurry sample diverted from a position in the connection between the outlet of the pretreatment arrangement and the inlet of the enzymatic hydrolysis arrangement; in the enzymatic hydrolysis reactor; and/or in a sample diverted from the enzymatic hydrolysis reactor.