A Novel Shadowgraphic Inline Measurement Technique for Image-Based Crystal Size Distribution Analysis

A novel shadowgraphic inline probe to measure crystal size distributions (CSD), based on acquired greyscale images, is evaluated in terms of elevated temperatures and fragile crystals, and compared to well-established, alternative online and offline measurement techniques, i.e., sieving analysis and online microscopy. Additionally, the operation limits, with respect to temperature, supersaturation, suspension, and optical density, are investigated. Two different substance systems, potassium dihydrogen phosphate (prisms) and thiamine hydrochloride (needles), are crystallized for this purpose at 25 L scale. Crystal phases of the well-known KH2PO4/H2O system are measured continuously by the inline probe and in a bypass by the online microscope during cooling crystallizations. Both measurement techniques show similar results with respect to the crystal size distribution, except for higher temperatures, where the bypass variant tends to fail due to blockage. Thiamine hydrochloride, a substance forming long and fragile needles in aqueous solutions, is solidified with an anti-solvent crystallization with ethanol. The novel inline probe could identify a new field of application for image-based crystal size distribution measurements, with respect to difficult particle shapes (needles) and elevated temperatures, which cannot be evaluated with common techniques.


Introduction
Crystallization is widely applied in agricultural, pharmaceutical, or chemical industry, with an enormous variety of duties and products. Besides purification and concentration of substances, crystallization is mainly applied to produce a particulate phase exhibiting defined properties. The particular requirements can be manifold. While for fine chemicals or active pharmaceutical ingredients (API) the solid-state form is commonly of major interest, a certain crystal size distribution (CSD) and crystal shape is usually demanded. Any of these particular properties affect the product functionality [1], as well as other processes in the downstream procedure (filtration, drying, etc.) [2,3]. Hence, control of the crystal size and solid-state form (e.g., polymorphism) is one important challenge that spreads over all fields of industrial crystallization [4].
noninvasive. Today, this technique is also applied in various fields of process engineering technology. Its disadvantages are a high space requirement and high costs, thus only at laboratory scale can applications be found. The techniques used in this article, beside sieving, are image-based techniques: an established bypass online microscope and the telecentric shadowgraphic probe for the evaluation of this new measurement technique. Both imaging techniques are described in detail below.

Shadowgraphic Optical Probe and Online Microscope
The in situ data of the experimental investigations in this study were recorded with two measurement systems: a commercial QICPIC online microscope (Sympatec, Germany) installed in a bypass and a shadowgraphic inline probe. The online microscope was using the transmitted light technique, where a pulsed light source is vis-à-vis of a camera. The measurement volume was formed by a flow-through cuvette that was placed between the optics and the light source. The parts were adjusted, so that the focus plane was in the middle of the cuvette. Thus, particles that were transported through the cell were captured sharply, with constant image quality.
A peristaltic pump fed the suspension via a temperature-controlled bypass to the cuvette and back to the crystallizer. The measurement volume had a fixed width of 2 mm given by the cuvette geometry. The camera and lens provided a square field of view of 5 mm in height and width at a resolution of 1024 pixel × 1024 pixel. The microscope software supports an autofocus function to adjust the focus plane of the camera in the middle of the flow cell, alternatively it could be adjusted manually.
The shadowgraphic probe is a further development of the so-called optical multimode online probe (OMOP) [48,49]. The primary design of the probe is based on a transmitted light technique and consists of two opposite protection tubes in a measurement flange.
One tube contains the illumination unit and the other one the camera and a telecentric lens. The light source consists of a LED placed in the focus point of a plano-convex lens, which emits a parallel light beam. The light beam is passed through the measurement volume between the two tubes, which are sealed with inspection windows in the front. Through the parallel light, high contrast images of the particles within the measurement volume can be acquired, even if the particles are nearly transparent.
In contrast, commercial image-based probes apply an incident light technique with an endocentric optics. In comparison, these probes have lower contrast ratios and natural image distortion is easily caused by the illumination and the optics [50,51]. Therefore, image analysis is quite challenging and requires significant effort to achieve quantitative results [52]. Furthermore, the depicted particles captured by the camera appear smaller, the larger the distance from the entocentric lens, and need sophisticated correction. Due to a comparably small focus areas, only a limited number of particles can be evaluated.
Alternatively, telecentric lenses provide a distant independent image of the particles when using parallel light. An aperture in the image-sided focus point of the lens filters out non-parallel light beams and, thus, shadowgraphic pictures are generated by parallel light only. Hence, no prior calibration is necessary. In addition, these lenses have higher depth of field compared to entocentric lenses, therefore having a large measurement volume instead of a focus plane. Hence, various versions of the OMOP for different applications, like capturing droplets [53,54], bubbles [55][56][57], or sprays [58,59] were developed.
In order to achieve easier access to an apparatus and to promote industrial applications, two probes have been designed recently; first, a robust DN 80 variant for industrial applications, with the full functionality of the two-sided OMOP principle [60]. Second, as a further development, a single sided endoscopic probe in DN 50 version was designed for laboratory scale [56,61], and was used for the experiments of this article. The probe has an adjustment mechanism where the position inside the apparatus and width of the measurement volume can be changed, even during the crystallization process, to adapt it to the increasing particle concentration (see Figure 1).

Experimental Setup
For the experiments in this study, the following setup was used for all experiments ( Figure 2): The temperature-controlled 25 L double jacket draft tube crystallizer was equipped with a propeller-type stirrer (diameter 150 mm, BASF, Ludwigshafen, Germany) and a PT100 was used to monitor the temperature (T in Figure 2). In order to measure the liquid phase composition, an attenuated total reflection Fourier-transform infrared spectroscope (ATR-FTIR, Thermo Fisher Scientific, Waltham, Massachusetts, USA) was used (FTIR in Figure 2).
The measurement depth of the shadowgraphic probe was set to 2 mm to be consistent with the flow cuvette of the online microscope. The probe was fitted with a Basler 1440-73 gm camera and a 1× telecentric lens, and the measurement volume was in the middle between the draft tube and the

Experimental Setup
For the experiments in this study, the following setup was used for all experiments (

Experimental Setup
For the experiments in this study, the following setup was used for all experiments ( Figure 2): The temperature-controlled 25 L double jacket draft tube crystallizer was equipped with a propeller-type stirrer (diameter 150 mm, BASF, Ludwigshafen, Germany) and a PT100 was used to monitor the temperature (T in Figure 2). In order to measure the liquid phase composition, an attenuated total reflection Fourier-transform infrared spectroscope (ATR-FTIR, Thermo Fisher Scientific, Waltham, Massachusetts, USA) was used (FTIR in Figure 2).
The measurement depth of the shadowgraphic probe was set to 2 mm to be consistent with the flow cuvette of the online microscope. The probe was fitted with a Basler 1440-73 gm camera and a 1× telecentric lens, and the measurement volume was in the middle between the draft tube and the The temperature-controlled 25 L double jacket draft tube crystallizer was equipped with a propeller-type stirrer (diameter 150 mm, BASF, Ludwigshafen, Germany) and a PT100 was used to monitor the temperature (T in Figure 2). In order to measure the liquid phase composition, an attenuated total reflection Fourier-transform infrared spectroscope (ATR-FTIR, Thermo Fisher Scientific, Waltham, Massachusetts, USA) was used (FTIR in Figure 2).
The measurement depth of the shadowgraphic probe was set to 2 mm to be consistent with the flow cuvette of the online microscope. The probe was fitted with a Basler 1440-73 gm camera and a 1× telecentric lens, and the measurement volume was in the middle between the draft tube and the reactor wall. The bypass for the online microscope was inserted at the top of the reactor, directly above the shadowgraphic probe to ensure that the withdrawn suspension was similar. A high bypass flow rate (≈40 L/h) was chosen to ensure unclassified sampling of the suspension. All bypass tubes were double jacketed and temperature-controlled by a thermostat, which were set to 1-1.5 K above the reactor temperature. Details of the QICPIC bypass setup are reported elsewhere [37,62].
Both measurement techniques were capturing 750 images at 25 fps for each measurement point to monitor the executed experiments. Additionally, solid-free offline samples of the liquid phase were taken every 5 min, which were analyzed gravimetrically to verify the inline data, and finally a representative suspension sample was taken from the bottom valve at the end of each experiment to allow for sieve analyses.

Substances
In order to analyze different crystal shapes, potassium dihydrogen phosphate (KH 2 PO 4 ) and thiamine hydrochloride were used. KH 2 PO 4 grew bipyramidal, prismatic shaped crystals, depicted in Figure 3a, and thiamine hydrochloride monohydrate grew needle-like shape, as depicted in Figure 3b.
Crystals 2020, 10, x FOR PEER REVIEW 6 of 29 reactor wall. The bypass for the online microscope was inserted at the top of the reactor, directly above the shadowgraphic probe to ensure that the withdrawn suspension was similar. A high bypass flow rate (≈ 40 L/h) was chosen to ensure unclassified sampling of the suspension. All bypass tubes were double jacketed and temperature-controlled by a thermostat, which were set to 1-1.5 K above the reactor temperature. Details of the QICPIC bypass setup are reported elsewhere [37,62]. Both measurement techniques were capturing 750 images at 25 fps for each measurement point to monitor the executed experiments. Additionally, solid-free offline samples of the liquid phase were taken every 5 min, which were analyzed gravimetrically to verify the inline data, and finally a representative suspension sample was taken from the bottom valve at the end of each experiment to allow for sieve analyses.

Substances
In order to analyze different crystal shapes, potassium dihydrogen phosphate (KH2PO4) and thiamine hydrochloride were used.
KH2PO4 grew bipyramidal, prismatic shaped crystals, depicted in Figure 3a, and thiamine hydrochloride monohydrate grew needle-like shape, as depicted in Figure 3b. KH2PO4 grows resilient crystals, that are very suitable for validation purposes, because they do not tend to break in a bypass, during filtration, or sieving. In order to design the crystallization process, the solubility and the kinetics must be known, especially because KH2PO4 tends to form longer or shorter body prisms, depending on the operation conditions. The crystallization kinetics in aqueous solutions and the solubility are well known and reported [62,63]. The latter can be described by the following polynomial expression: Thiamine hydrochloride exists in five solid-state forms, according to the literature [64,65]. The desired form in industrial applications is a pseudo-monohydrate that crystallizes in contact with water, and contains 0.5 to 1 mole water per mole thiamine in the needle-like shaped crystals (see Figure 3b). KH 2 PO 4 grows resilient crystals, that are very suitable for validation purposes, because they do not tend to break in a bypass, during filtration, or sieving. In order to design the crystallization process, the solubility and the kinetics must be known, especially because KH 2 PO 4 tends to form longer or shorter body prisms, depending on the operation conditions. The crystallization kinetics in aqueous solutions and the solubility are well known and reported [62,63]. The latter can be described by the following polynomial expression: Thiamine hydrochloride exists in five solid-state forms, according to the literature [64,65]. The desired form in industrial applications is a pseudo-monohydrate that crystallizes in contact with water, and contains 0.5 to 1 mole water per mole thiamine in the needle-like shaped crystals (see Figure 3b). However, this monohydrate is metastable at ambient conditions and converts fast into the thermodynamic stable thiamin hydrochloride hemihydrate. Hence, the solid-liquid equilibrium of the pseudo-monohydrate is difficult to measure, and therefore barely investigated [65,66]. Fortunately, data of the less-soluble thiamine hydrochloride hemihydrate in some binary solvents are reported, and therefore the experimental design was based on data of a binary water/ethanol mixture [67]. Some physiochemical properties of the thiamin hydrochloride and KH 2 PO 4 are shown in Table 1.  Table 2 depicts the conditions of the executed experiments, one with thiamine hydrochloride (Exp. 5) and four with KH 2 PO 4 (Exp. 1-4). For Exp. 1-3 the saturation temperature was 35 • C and the cooling rate, the final temperature, and the mass of the seed loading was varied for each experiment to evaluate the limits, with respect to the suspension density and crystal size. The seed fraction was sieved and had a normal distributed initial size of 212-300 µm for all experiments, except for Exp. 3. Smaller seeds with a range of 150-212 µm were used in this case to alter the initial suspension and optical density, to evaluate the impact of these parameters on the crystal size measurements. The fourth experiment was carried out with a larger initial concentration (according to a saturation temperature of 56.5 • C), since it is well known that the bypass of online microscopes often tends to block under these conditions. In addition, an anti-solvent crystallization, Exp. 5, of thiamine hydrochloride was performed to evaluate the applicability of the shadowgraphic probe to fragile crystal systems.  Table 2), the impeller speed was set to 250 rpm and the crystallizer was heated a priori for 0.5 h to 5-10 K above the respective saturation temperature to ensure complete dissolution and equal starting conditions for all experiments. Afterwards, the clear solutions were slightly subcooled (0.1-1 K) and the seeds were added at temperature T seed (see Table 2) and time t = 0 h. Subsequently, cooling was executed as a simple linear cooling ramp after the seed's addition, with a certain slope between −7.5 • C/h and −12 • C/h (see Figure 4a for an exemplary temperature curve of Exp. 3-KH 2 PO 4 ). Immediately after seeding (t = 0 h), the particle size was measured simultaneously every 5 min by the online microscope and the shadowgraphic probe. The experiments ended at the final temperature, T end , if either the suspension density was too high, resulting in too much overlapping of the single crystals, or excessive nucleation was observed. During the last measurement of the crystal size by the optical methods an unclassified suspension sample was taken from the bottom valve of the reactor, and was immediately filtered using a strainer and a filter paper. Then, the filter cake was washed with an adjusted ethanol/water-mixture to prevent nucleation or dissolution of the crystals through the residual Crystals 2020, 10, 740 8 of 26 mother liquor. Afterwards, the crystals were dried and sieved to determine the mass-based size distribution. During the experiments with KH 2 PO 4 , the state of the liquid phase was monitored by a calibrated ATR-FTIR and by solid-free liquid samples, which were taken every 5 min, simultaneous to the particle size measurements (see Figure 4b).

Experimental Procedure
seeding (t = 0 h), the particle size was measured simultaneously every 5 minutes by the online microscope and the shadowgraphic probe. The experiments ended at the final temperature, Tend, if either the suspension density was too high, resulting in too much overlapping of the single crystals, or excessive nucleation was observed. During the last measurement of the crystal size by the optical methods an unclassified suspension sample was taken from the bottom valve of the reactor, and was immediately filtered using a strainer and a filter paper. Then, the filter cake was washed with an adjusted ethanol/water-mixture to prevent nucleation or dissolution of the crystals through the residual mother liquor. Afterwards, the crystals were dried and sieved to determine the mass-based size distribution. During the experiments with KH2PO4, the state of the liquid phase was monitored by a calibrated ATR-FTIR and by solid-free liquid samples, which were taken every 5 minutes, simultaneous to the particle size measurements (see Figure 4b). From ATR-FTIR spectra the mass fraction ( / ) was calculated by an existing calibration, successfully applied in the past [68] to evaluate the suspension density, where is the concentration of the FTIR and is the initial concentration: The supersaturation, S, is the driving force in crystallization, and was calculated according to Equation (3), with the concentration at saturation, ( ( )).
The experiments started at small supersaturations, which gradually increased due to cooling. After about 0.6 h sufficient solid surface was present in the crystallizer to counterbalance the supersaturation generation and the driving force started to decrease, exemplarily shown in Figure 5a for Exp. 3 -KH2PO4. From ATR-FTIR spectra the mass fraction (m KDP /m solution ) was calculated by an existing calibration, successfully applied in the past [68] to evaluate the suspension density, where c FTIR is the concentration of the FTIR and c 0 is the initial concentration: The supersaturation, S, is the driving force in crystallization, and was calculated according to Equation (3), with the concentration at saturation, c sat (T(t)).
The experiments started at small supersaturations, which gradually increased due to cooling. After about 0.6 h sufficient solid surface was present in the crystallizer to counterbalance the supersaturation generation and the driving force started to decrease, exemplarily shown in Figure 5a for Exp. 3-KH 2 PO 4 .
The concentration of the liquid phase versus temperature in the binary phase diagram for all KH 2 PO 4 experiments is given in Figure 5b. Exp.1-3 have almost identical conditions with a saturation temperature of 35 • C and only Exp. 4 was saturated at an elevated temperature. A significant influence of the seed load or the cooling ramp on the concentration profile is not clearly visible due to the fast crystallization kinetics of KH 2 PO 4 .
In addition, a fifth experiment with thiamin hydrochloride was carried out as an anti-solvent crystallization via primary nucleation. The thiamine hydrochloride was dissolved in water and added to the reactor. At t start = 0 h the ethanol was added as the antisolvent. The initial masses were calculated based on literature data [67]. The experiment was carried out at a constant temperature of 25 • C, and the impeller speed was set to 250 rpm, similar to the experiments with KH 2 PO 4 .
The shadowgraphic probe took pictures of the suspension every minute from the beginning, and after a significant number of crystals were visible (t = 1 h), the online microscope in the bypass was put into operation. The concentration of the liquid phase versus temperature in the binary phase diagram for all KH2PO4 experiments is given in Figure 5b. Exp.1-3 have almost identical conditions with a saturation temperature of 35 °C and only Exp. 4 was saturated at an elevated temperature. A significant influence of the seed load or the cooling ramp on the concentration profile is not clearly visible due to the fast crystallization kinetics of KH2PO4.
In addition, a fifth experiment with thiamin hydrochloride was carried out as an anti-solvent crystallization via primary nucleation. The thiamine hydrochloride was dissolved in water and added to the reactor. At tstart = 0 h the ethanol was added as the antisolvent. The initial masses were calculated based on literature data [67]. The experiment was carried out at a constant temperature of 25 °C, and the impeller speed was set to 250 rpm, similar to the experiments with KH2PO4.
The shadowgraphic probe took pictures of the suspension every minute from the beginning, and after a significant number of crystals were visible (t = 1 h), the online microscope in the bypass was put into operation.
The experiment was carried out until the concentration was too high to identify single crystals. Taking a suspension sample similar to the experiments with KH2PO4, was not possible since the thin, needle-like crystals of the thiamine hydrochloride monohydrate broke during filtration and further handling. A representative sieving analysis was, therefore, not possible and the crystal length and width were only determined via image processing.

Image Processing
The pictures of the probe and the microscope were evaluated with an existing MATLAB routine [69]. Based on the difference in contrast between the crystals and the background, the crystals could be isolated through contrast enhancement and binarization. In addition, a dynamic background subtraction out of a picture series was carried out to eliminate scratches or immobile adherent particles. The KH2PO4 crystals, especially, have large bright areas in the crystal center (see Figure 3a) that would lead to erroneous object identification. Therefore, morphological closing and region filling was utilized to fill the empty areas within the crystals.
The evaluation focuses on single crystals only, assuming agglomerates are of negligible number. Therefore, two shape descriptors, the numerical eccentricity, ε , (Equation. 4) of an ellipse, and solidity, s, for the description of the convexity (Equation. 5), were used to exclude agglomerates from further evaluation. The experiment was carried out until the concentration was too high to identify single crystals. Taking a suspension sample similar to the experiments with KH 2 PO 4 , was not possible since the thin, needle-like crystals of the thiamine hydrochloride monohydrate broke during filtration and further handling. A representative sieving analysis was, therefore, not possible and the crystal length and width were only determined via image processing.

Image Processing
The pictures of the probe and the microscope were evaluated with an existing MATLAB routine [69]. Based on the difference in contrast between the crystals and the background, the crystals could be isolated through contrast enhancement and binarization. In addition, a dynamic background subtraction out of a picture series was carried out to eliminate scratches or immobile adherent particles. The KH 2 PO 4 crystals, especially, have large bright areas in the crystal center (see Figure 3a) that would lead to erroneous object identification. Therefore, morphological closing and region filling was utilized to fill the empty areas within the crystals.
The evaluation focuses on single crystals only, assuming agglomerates are of negligible number. Therefore, two shape descriptors, the numerical eccentricity, ε, (Equation (4)) of an ellipse, and solidity, s, for the description of the convexity (Equation (5)), were used to exclude agglomerates from further evaluation.
The use of these parameters was based on experience and was successfully applied for single crystals of KH 2 PO 4 in the past. Particles are classified as single crystals if the eccentricity was within 0.4 to 1, and the solidity from 0.95 to 1, respectively. As a result, gas bubbles and overlapping crystals were excluded in the data evaluation. This was manually crosschecked by comparing the crystal detection results with the original images. Furthermore, crystals touching the image border were not considered in the evaluation, since incomplete objects lead to erroneous size calculations. More details about the algorithm are reported in the literature [69].
In order to evaluate the geometry of the observed objects and to calculate meaningful distributions, it is necessary to choose a reasonable characteristic length. For slightly elongated bipyramidal crystals with a square prism body, the width of the square cross-sectional area can be used as a characteristic length, L, to describe its size. This length can be obtained by the minimal Feret's diameter, L Fmin of the projected area of the crystal, but the orientation of the crystal to the picture must be considered. The relevant orientation for the representation of the minimal Feret's diameter is given by the rotation around an axis, passing the two pyramid tips along the elongated direction of the crystal. Imaging a rotation around this axis, while constantly measuring the minimal Feret's diameter, gives values between a minimum and a maximum value, L and √ 2L for L Fmin . Assuming that the orientation of the particles is normally distributed, for the probability of all rotations between the two extreme values, an arithmetic mean L 1 can be described according to: Based on this averaged crystal width of the square prism body, the distributions can be compared with the sieving analysis, where L 1 is measured. There are advanced methods for the correction of the crystal orientation reported in the literature [36], but for the sake of simplicity and computational effort, this approach was chosen.
The single crystals detected and measured by the image analysis were sorted in 400 size classes between 1 and 2000 µm, based on their corrected crystal size, and normalized by the class width, giving the number distribution, f (L). Normalization by the integral f j (L)dL yields the density distribution q j of dimension j: Additionally, the percentiles, p, were utilized for the comparison of the online microscope and the shadowgraphic probe's results according to: The results were depicted and evaluated in terms of number distribution (j = 0) and mass distribution (j = 3), mainly, but other characteristic values of distributions can be used, as well [70,71].
Thiamin hydrochloride crystals were characterized utilizing the same algorithm, but without any correction of the Feret's diameter for the orientation. The minimal and maximal Feret's diameter were interpreted as the width and the length of the needles.
Further, for both substance systems an optical density was calculated based on the acquired and binarized images of the shadowgraphic probe and the QICPIC. For this purpose, the number of all black pixels in an image was divided by its resolution. This ratio was used in the following, called optical suspension density, and helps to interpret the results.

Results and Discussion
In the following, the results of Exp. 3 with the highest initial suspension density will be discussed in detail, because the Exp. 1 and Exp. 2 show similar results and have the same starting saturation temperature. Furthermore, Exp. 4 will be shown, as it has a higher starting saturation temperature. Afterwards the results of the thiamine hydrochloride crystals will be discussed. Figure 6 gives an example of captured KH 2 PO 4 crystals, with the online microscope in comparison with the shadowgraphic probe. Both pictures show good contrast ratios, which simplifies the subsequent image processing. The imaged crystals have clear edges and can be accurately detected and measured by the algorithm. Thus, the number, q 0 , and mass, q 3 , density functions of the distributions could be calculated as shown in Figure 7. In the number density functions (see Figure 7a,b), the evolution of the fines content can be visualized, while the mass density function (see Figure 7c,d) serves to illustrate the evolution of the larger crystal fractions. Figure 6 gives an example of captured KH2PO4 crystals, with the online microscope in comparison with the shadowgraphic probe. Both pictures show good contrast ratios, which simplifies the subsequent image processing. The imaged crystals have clear edges and can be accurately detected and measured by the algorithm. Thus, the number, q0, and mass, q3, density functions of the distributions could be calculated as shown in Figure 7. In the number density functions (see Figure  7a,b), the evolution of the fines content can be visualized, while the mass density function (see Figure  7c,d) serves to illustrate the evolution of the larger crystal fractions.  In general, both techniques give similar distributions. The number distributions show, for t = 0 h two major crystal fractions, one with about 50 µm and another one with 184 µm. As seen in the mass distributions, the small fraction is not visible and was probably caused by fine grain KH2PO4 particles in the seeds and dust. After a time of about t = 0.6 h, where the largest supersaturation was In general, both techniques give similar distributions. The number distributions show, for t = 0 h two major crystal fractions, one with about 50 µm and another one with 184 µm. As seen in the mass distributions, the small fraction is not visible and was probably caused by fine grain KH 2 PO 4 particles in the seeds and dust. After a time of about t = 0.6 h, where the largest supersaturation was present (see. Figure 5a) a shift in crystal size towards bigger crystals due to growth can be observed (see Figure 7). Obviously, a certain threshold driving force must be present for the seeds to become active. Several reasons are known for this behavior, e.g., the crystal surfaces need to heal before macroscopic growth can take place or impurities block growth centers. However, a detailed study of the mechanism is not the focus of this article. The q 0 -distributions (Figure 7a,b) also show that the number of smaller particles increases at the same time, caused by nucleation. After crystal growth can be observed, a significant broadening of the seed fraction is visible (see Figure 7c,d for t > 0.6 h), which can be attributed to growth rate dispersion. This influence can also be seen with a look at the percentiles, therefore they are shown as the top view in Figure 8, on the 3D diagram in Figure 7. For a better overview the surface plot is not shown in Figure 8. The percentiles of the number, and mass density distribution, match well for both optical measurement techniques (Figure 8a), and show almost identical curves. Hence, an explicit classification effect of one measurement technique, either caused by the sample withdrawal to the bypass or by the measurement gap of the inline probe, can be excluded. For t = 0 h, the percentiles match with the initial size range of the seeds (see Table 3), and confirm a reasonable measurement of the crystal size. The change of the crystal size can be tracked properly over the whole experimental time. This can be confirmed with respect to the q3-distributions obtained by the sieve analysis of the suspension sample at the end of the experiment (see Figure 8b).

Comparison of the Crystal Size Measurement Techniques with KH 2 PO 4 Crystals
The comparison shows that the distributions measured by the optical measurement techniques fit well with the sieve analyses. The fraction of 0-200 µm is underestimated by the sieve analysis compared to the optical techniques. Probably, a part of the fines is lost during solid/liquid separation, washing, and sieving. In the range of 450-600 µm a slightly higher density for larger particles in the sieve analysis is visible. Since the image analysis focuses on single crystals, the agglomerates are not considered in the imaging techniques. In contrast, the sieve analysis also has agglomerates in the distribution, therefore this shift can be addressed to a small amount of agglomerates present in the sample. In summary, both optical measurement techniques are suitable to evaluate crystal size distributions. The deviations are in the typical error range, except for the final crystal size of Exp. 2. However, the main sources of deviation in image-based size determination, in general, is the image conversion and the binarization. About two pixels on the edges was the common deviation during the capturing by the camera, and an additional two pixel uncertainty occurred during the thresholding for the binarization. This sums up to four pixel in total, which equals 20 µm with a pixel size of 5 µm (depending on the camera and the lens used) for both techniques, and is the typical error range for image-based size evaluation in general.
Several parameters were changed during experiments Exp. 1-3, initial seed loading, seed size, The percentiles of the number, and mass density distribution, match well for both optical measurement techniques (Figure 8a), and show almost identical curves. Hence, an explicit classification effect of one measurement technique, either caused by the sample withdrawal to the bypass or by the measurement gap of the inline probe, can be excluded. For t = 0 h, the percentiles match with the initial size range of the seeds (see Table 3), and confirm a reasonable measurement of the crystal size. The change of the crystal size can be tracked properly over the whole experimental time. This can be confirmed with respect to the q 3 -distributions obtained by the sieve analysis of the suspension sample at the end of the experiment (see Figure 8b). The comparison shows that the distributions measured by the optical measurement techniques fit well with the sieve analyses. The fraction of 0-200 µm is underestimated by the sieve analysis compared to the optical techniques. Probably, a part of the fines is lost during solid/liquid separation, washing, and sieving. In the range of 450-600 µm a slightly higher density for larger particles in the sieve analysis is visible. Since the image analysis focuses on single crystals, the agglomerates are not considered in the imaging techniques. In contrast, the sieve analysis also has agglomerates in the distribution, therefore this shift can be addressed to a small amount of agglomerates present in the sample. In summary, both optical measurement techniques are suitable to evaluate crystal size distributions. The deviations are in the typical error range, except for the final crystal size of Exp. 2. However, the main sources of deviation in image-based size determination, in general, is the image conversion and the binarization. About two pixels on the edges was the common deviation during the capturing by the camera, and an additional two pixel uncertainty occurred during the thresholding for the binarization. This sums up to four pixel in total, which equals 20 µm with a pixel size of 5 µm (depending on the camera and the lens used) for both techniques, and is the typical error range for image-based size evaluation in general.
Several parameters were changed during experiments Exp. 1-3, initial seed loading, seed size, final process temperature, and the final crystal size, as well as the optical and suspension density. The latter two cannot be controlled directly but are a result of various process parameters. None of the changes led to a significant impact on the deviation between both optical measurement techniques, since a good agreement was found for density functions of all experiments (see Appendix A for the other detailed results of Exp. 1 and 2). A comparison of the initial seed sizes of all experiments (see Table 3) confirms a suitable determination of the crystal sizes between the QICPIC and the shadowgraphic probe. At the end of the experiments where larger crystals occurred, the probe measured slightly smaller crystal sizes than the QICPIC and the sieve analysis, but the deviations were still in the deviation of 20 µm mentioned above. Nevertheless, an effect of the measurement window of the shadowgraphic probe can be assumed. Larger particles tend to touch the image border, especially if the measurement window is smaller. Because the QICPIC has a larger measurement window (5 mm × 5 mm) than the probe (5 mm × 3.5 mm), this effect is maybe noticeable. Only Exp. 2 shows significant deviations for the measured final crystal sizes. For this experiment the percentiles (see Appendix A Figure A7) are almost identical for both techniques, except at the last two measurement points. For these measurements the percentiles show a significant drop, and the amount of measured crystals increases drastically. The supersaturation curve (see Appendix A Figure A8) shows an increase of the concentration and secondary nucleation occurs, which causes the decrease in the mean crystal size. Additionally, the probe has more agglomerates in the images, leading to fewer single particles being detected. A classifying effect may occur within the QICPIC bypass, where these agglomerates are seen less often, and therefore more single crystals are detected. Although the final crystal sizes show deviations in Exp. 2, the percentiles confirm a suitable transient crystal size determination up to the last 10 min. It is not clear if secondary nucleation will affect the measurement in general and this must be clarified in further investigations. The usage of larger measurement windows with a sophisticated algorithm for agglomerates can maybe solve this issue.
It is important to consider the number of particles measured in order to have a statistically verified PSD. Therefore, the total amount of measured crystals for each optical technique is shown, with their corresponding optical density, in Figure 9a. For the online microscope and the shadowgraphic probe it is clearly visible that the number of measured particles decreases over time, which is caused by the increasing number of larger crystals. This is a key issue of image analysis in general as there are particles in the system that overlap with smaller particles or other particles. Hence, these overlapping clusters of particles cannot be evaluated by the algorithm, which then leads to erroneous PSD's. The other reason is, that comparable larger particles, with respect to the image size, have a higher probability of being cut off by the measurement window. Therefore, these particles are likewise not detected and lead to a smaller number of measured particles. Nevertheless, both optical techniques measure a few thousand particles for each distribution, guaranteeing a statistically sufficient amount for a representative distribution. The results also show that the online microscope detects more particles than the shadowgraphic probe. This is an expectable phenomenon, since the measurement window of the probe is smaller, due to a smaller camera sensor size, in comparison to the microscope. density. Effects such as the overshadowing of smaller particles caused by larger ones, and overlapping, affect these values measured with the optical techniques. Therefore, the optical density is additionally connected to the dispersity of the particulate phase. Furthermore, the suspension density, determined by the concentration measurement, is a global value, while the optical measurement techniques provide local information. This means that the optical methods can recognize overall trends in the suspension density but are not suitable for its representation. Nevertheless, it could be shown that crystal size evaluation is possible and not affected by the suspension density, at least up to 6% in Exp. 3, and up to 8% in Exp. 2. The suspension density can either be over-or underestimated with optical methods in comparison with the suspension density calculated with the FTIR data of Exp. 2, as given in Figure  10. At the start of the experiment, where a narrow distribution of one crystal size was present, the optical suspension density was less that the mass-based suspension density. This changed during the experiment, because the optical density was additionally connected to the dispersity of the system. Multimodal distributions increase the optical density, especially the fine particle content increases the particulate content in the pictures, and lead to higher optical densities. As a result, the optical density cannot be used to determine the suspension density directly, because the particulate state must be taken into account as well. The suspension density, according to Equation (2), derived from ATR-FTIR data, confirms the measured increase in crystal size at t = 0.6 h. The optical density based on pixel ratios shows a similar trend (see Figure 9b), although the optical densities do not match with the mass-based suspension density. Effects such as the overshadowing of smaller particles caused by larger ones, and overlapping, affect these values measured with the optical techniques. Therefore, the optical density is additionally connected to the dispersity of the particulate phase. Furthermore, the suspension density, determined by the concentration measurement, is a global value, while the optical measurement techniques provide local information. This means that the optical methods can recognize overall trends in the suspension density but are not suitable for its representation. Nevertheless, it could be shown that crystal size evaluation is possible and not affected by the suspension density, at least up to 6% in Exp. 3, and up to 8% in Exp. 2.
The suspension density can either be over-or underestimated with optical methods in comparison with the suspension density calculated with the FTIR data of Exp. 2, as given in Figure 10. At the start of the experiment, where a narrow distribution of one crystal size was present, the optical suspension density was less that the mass-based suspension density. This changed during the experiment, because the optical density was additionally connected to the dispersity of the system. Multimodal distributions increase the optical density, especially the fine particle content increases the particulate content in the pictures, and lead to higher optical densities. As a result, the optical density cannot be used to determine the suspension density directly, because the particulate state must be taken into account as well.

Investigation of KH 2 PO 4 at Elevated Temperature
The experiment EXP. 4-KH 2 PO 4 started at an elevated seeding temperature of 56.4 • C. After seeding, both optical measurement techniques were able to measure the initial crystal size distribution. After t = 0.5 h the reactor reached a temperature of around 50 • C and crystallization occurred in the bypass of the online microscope, which led to a blockage. Therefore, the bypass was closed down and only the shadowgraphic probe was used to evaluate the state of the particulate phase (see Figure 11). optical suspension density was less that the mass-based suspension density. This changed during the experiment, because the optical density was additionally connected to the dispersity of the system. Multimodal distributions increase the optical density, especially the fine particle content increases the particulate content in the pictures, and lead to higher optical densities. As a result, the optical density cannot be used to determine the suspension density directly, because the particulate state must be taken into account as well.

Investigation of KH2PO4 at Elevated Temperature
The experiment EXP. 4 -KH2PO4 started at an elevated seeding temperature of 56.4 °C. After seeding, both optical measurement techniques were able to measure the initial crystal size distribution. After t = 0.5 h the reactor reached a temperature of around 50 °C and crystallization occurred in the bypass of the online microscope, which led to a blockage. Therefore, the bypass was closed down and only the shadowgraphic probe was used to evaluate the state of the particulate phase (see Figure 11). Both principles have a good match with the distributions of the seeds, and similar growth is visible for both techniques at starting conditions. After the bypass was blocked, the shadowgraphic probe recognized a broadening of the mass-based distribution, therefore the larger fractions are no longer visible in the number distribution. This is also caused by nucleation of smaller crystals that are dominant in number compared to the larger grown seeds. This smaller fraction increased rapidly in number and therefore, accounts for about 15% of solid fraction in the mass-based distribution. To sum up, the inline probe can be utilized at conditions where massive nucleation and fast crystal growth leads to blocking of a bypass-based measurement technique, which requires a precise temperature control when withdrawing samples. This shows clearly that the probe opens a new field of applications, where other measurement systems fail.

Crystallization of Thiamin Hydrochloride Monohydrate
The crystallization of thiamine hydrochloride monohydrate was performed as nucleation from aqueous solution with ethanol as antisolvent. Nucleation was observed by the shadowgraphic probe after approximately t = 0.3 h after adding the antisolvent. These crystals were only a few pixels in width, and a certain time was necessary to overcome the lower detection limit of the probe, therefore an exact time cannot be referred. After t = 0.6 h, a representative amount of crystals was visible within the images. The amount increased significantly up to the time of t = 1 h, when the bypass was put into operation. As the suspension passed the flow cuvette, the online microscope was not capable of setting an autofocus automatically, therefore the focus had to be adjusted manually. An example of Both principles have a good match with the distributions of the seeds, and similar growth is visible for both techniques at starting conditions. After the bypass was blocked, the shadowgraphic probe recognized a broadening of the mass-based distribution, therefore the larger fractions are no longer visible in the number distribution. This is also caused by nucleation of smaller crystals that are dominant in number compared to the larger grown seeds. This smaller fraction increased rapidly in number and therefore, accounts for about 15% of solid fraction in the mass-based distribution. To sum up, the inline probe can be utilized at conditions where massive nucleation and fast crystal growth leads to blocking of a bypass-based measurement technique, which requires a precise temperature control when withdrawing samples. This shows clearly that the probe opens a new field of applications, where other measurement systems fail.

Crystallization of Thiamin Hydrochloride Monohydrate
The crystallization of thiamine hydrochloride monohydrate was performed as nucleation from aqueous solution with ethanol as antisolvent. Nucleation was observed by the shadowgraphic probe after approximately t = 0.3 h after adding the antisolvent. These crystals were only a few pixels in width, and a certain time was necessary to overcome the lower detection limit of the probe, therefore an exact time cannot be referred. After t = 0.6 h, a representative amount of crystals was visible within the images. The amount increased significantly up to the time of t = 1 h, when the bypass was put into operation. As the suspension passed the flow cuvette, the online microscope was not capable of setting an autofocus automatically, therefore the focus had to be adjusted manually. An example of the images taken by the optical methods is given in Figure 12. The crystals captured with the online microscope appear blurry, without clear edges, and a proper image evaluation is not possible. In addition, the bypass could only be utilized for a few minutes before the suspension flow blocked. In contrast, the shadowgraphic probe was still capable of capturing images with sharp edges and suitable image quality for a crystal size evaluation. For the present case, the telecentric lens in the shadowgrphic probe shows a clear advantage, because no focus has to be adjusted, and the depth of field covers the whole measured volume. After t = 1.22 h, the experiment was ended due to a significant increase in suspension density. At this point even a qualitative evaluation of the captured images was not possible, either with the online microscope nor with the shadowgraphic probe. Figure 13 shows images captured by the shadowgraphic probe of the suspension in different states.
At about t = 1 h the crystals grew as thin needles, as described above. They varied in length and width but were mostly isolated single crystals. Already a few minutes later (t = 1.16 h), the suspension density increased significantly, which may have been supported by natural breakage and secondary nucleation. Hence, the broken crystal pieces increase the total particle number, additionally. Due to the increased number of crystals, single particles have an increased probability of colliding with each other and forming agglomerates, which can be seen at the time mark for t = 1 h in Figure 13c,d.
For this state of the system an image evaluation of the crystals is quite challenging and may not be solved with a conventionally image analysis based on binary object identification, because the thin needles overlap and single crystals cannot be identified [72]. Interestingly, the needles tend to align with the flow direction in the measured volume of the shadowgraphic probe, especially at a higher solid content. Because the gap is comparably small to the vessel, the flow inside the gap is hindered and mostly laminar, even if the flow around it is turbulent. A group of researchers reported an algorithm which was utilized to determine the size of high-aspect-ratio crystals. They found that an irregular alignment hinders clear object detection at a higher solid content [72]. Therefore, the alignment of the needle-like crystals in the shadowgraphic probe could be an opportunity to investigate the crystallization in such difficult systems, with high aspect ratios of the particles.
Although a crystal size determination with the presented methods was not possible after t = 1 h, a measurement of the optical suspension density was still possible (see Figure 13). The crystals captured with the online microscope appear blurry, without clear edges, and a proper image evaluation is not possible. In addition, the bypass could only be utilized for a few minutes before the suspension flow blocked. In contrast, the shadowgraphic probe was still capable of capturing images with sharp edges and suitable image quality for a crystal size evaluation. For the present case, the telecentric lens in the shadowgrphic probe shows a clear advantage, because no focus has to be adjusted, and the depth of field covers the whole measured volume. After t = 1.22 h, the experiment was ended due to a significant increase in suspension density. At this point even a qualitative evaluation of the captured images was not possible, either with the online microscope nor with the shadowgraphic probe. Figure 13 shows images captured by the shadowgraphic probe of the suspension in different states.
At about t = 1 h the crystals grew as thin needles, as described above. They varied in length and width but were mostly isolated single crystals. Already a few minutes later (t = 1.16 h), the suspension density increased significantly, which may have been supported by natural breakage and secondary nucleation. Hence, the broken crystal pieces increase the total particle number, additionally. Due to the increased number of crystals, single particles have an increased probability of colliding with each other and forming agglomerates, which can be seen at the time mark for t = 1 h in Figure 13c,d.
For this state of the system an image evaluation of the crystals is quite challenging and may not be solved with a conventionally image analysis based on binary object identification, because the thin needles overlap and single crystals cannot be identified [72]. Interestingly, the needles tend to align with the flow direction in the measured volume of the shadowgraphic probe, especially at a higher solid content. Because the gap is comparably small to the vessel, the flow inside the gap is hindered and mostly laminar, even if the flow around it is turbulent. A group of researchers reported an algorithm which was utilized to determine the size of high-aspect-ratio crystals. They found that an irregular alignment hinders clear object detection at a higher solid content [72]. Therefore, the alignment of the needle-like crystals in the shadowgraphic probe could be an opportunity to investigate the crystallization in such difficult systems, with high aspect ratios of the particles. The optical density shows a rapidly increasing amount of crystals that started at around t = 0.3 h. From that point, the optical density increased with exponential progression. The width and length distributions at different experiment times are shown in Figure 14.
The diagram for t = 0 h was made as a reference, where mostly dust was detected. At t = 0.63 h the first reliable distribution shows that the single needle-like crystals have between 500-1000 µm in length and 20-40 µm width. At t = 0.97 h the crystal sizes are about the same, while their amount has significantly increased. The last diagram at t = 1.18 h depicts only a detection of small particles, which clearly shows that the simple image algorithm that was applied failed to isolate the crystals, and is the limit in PSD evaluation, at least with the methods that were used.
The comparison between the thiamine hydrochloride and KH2PO4 experiments shows clearly that the limiting optical density for image-based measurement systems depends on several properties of the particulate phase, e.g., size, size distribution, and shape. KH2PO4 could be measured up to an optical density of 8% for the shadowgraphic probe and 11% for the online microscope, with a suspension density (FTIR) of 7%. The measurement had already failed for thiamine at a value of 3% to 4% optical density of the probe (see Figure 13, t = 1 h). Hence, a clear suspension, or optical density limit, of application for both utilized techniques cannot be given here. It has to be determined for each substance system individually, and the methods for the image evaluation must be adjusted for the specific case in order to maximize the applicability. Although a crystal size determination with the presented methods was not possible after t = 1 h, a measurement of the optical suspension density was still possible (see Figure 13).
The optical density shows a rapidly increasing amount of crystals that started at around t = 0.3 h. From that point, the optical density increased with exponential progression. The width and length distributions at different experiment times are shown in Figure 14.
The diagram for t = 0 h was made as a reference, where mostly dust was detected. At t = 0.63 h the first reliable distribution shows that the single needle-like crystals have between 500-1000 µm in length and 20-40 µm width. At t = 0.97 h the crystal sizes are about the same, while their amount has significantly increased. The last diagram at t = 1.18 h depicts only a detection of small particles, which clearly shows that the simple image algorithm that was applied failed to isolate the crystals, and is the limit in PSD evaluation, at least with the methods that were used.
The comparison between the thiamine hydrochloride and KH 2 PO 4 experiments shows clearly that the limiting optical density for image-based measurement systems depends on several properties of the particulate phase, e.g., size, size distribution, and shape. KH 2 PO 4 could be measured up to an optical density of 8% for the shadowgraphic probe and 11% for the online microscope, with a suspension density (FTIR) of 7%. The measurement had already failed for thiamine at a value of 3% to 4% optical density of the probe (see Figure 13, t = 1 h). Hence, a clear suspension, or optical density limit, of application for both utilized techniques cannot be given here. It has to be determined for each substance system individually, and the methods for the image evaluation must be adjusted for the specific case in order to maximize the applicability.

Conclusions
A novel inline shadowgraphic probe was utilized to determine the transient crystal size distribution in different crystallization processes, based on acquired greyscale images. For validation, three experiments in a well-known seeded KH2PO4/H2O cooling crystallization were carried out, and the crystal size distributions between the new shadowgraphic probe were compared with an established bypass online microscope and sieve analysis. The measured number and mass distributions showed a good agreement for both image-based techniques in all three experiments. The percentiles support the results, as they exhibit similar trends and values with an average deviation of 10-20 µm. Classifying effects, such as shifts in the crystal size distributions could not be observed up to a characteristic crystal size of 600 µm. This is confirmed by sieve analyses of suspension samples that were compared to the final mass-based distributions of the optical techniques. The experiments were performed for different seed loadings, and hence, different suspension densities up to 8%, and an optical density up to 11%, without any influence with respect to the measured distributions.
In addition, a fourth experiment, with the same substances at a higher starting saturation, temperature was executed. It was shown that the probe can be applied to these elevated temperatures

Conclusions
A novel inline shadowgraphic probe was utilized to determine the transient crystal size distribution in different crystallization processes, based on acquired greyscale images. For validation, three experiments in a well-known seeded KH 2 PO 4 /H 2 O cooling crystallization were carried out, and the crystal size distributions between the new shadowgraphic probe were compared with an established bypass online microscope and sieve analysis. The measured number and mass distributions showed a good agreement for both image-based techniques in all three experiments. The percentiles support the results, as they exhibit similar trends and values with an average deviation of 10-20 µm.
Classifying effects, such as shifts in the crystal size distributions could not be observed up to a characteristic crystal size of 600 µm. This is confirmed by sieve analyses of suspension samples that were compared to the final mass-based distributions of the optical techniques. The experiments were performed for different seed loadings, and hence, different suspension densities up to 8%, and an optical density up to 11%, without any influence with respect to the measured distributions.
In addition, a fourth experiment, with the same substances at a higher starting saturation, temperature was executed. It was shown that the probe can be applied to these elevated temperatures and conditions, while a measurement with the bypass variant failed due to a blockage within the bypass tubes.
Needle-like thiamine hydrochloride monohydrate was crystallized from a clear thiamine/water solution when adding ethanol as an anti-solvent. The process was only investigated using the shadowgraphic probe, since measurements with the bypass online microscope failed due to blocking. In addition, the images captured by the online microscope had poor image quality, due to blurry edges of the imaged objects. The needle-like crystals could be measured in length and width up to a suspension density of three percent, until the image algorithm based on binarization failed, due to missing segmentation methods and massive particle overlapping. It was shown that the shadowgraphic probe can be applied to systems that form fragile crystals, where other techniques fail. It was found that the needle-like crystals align with the flow direction in the measurement gap, which offers a great potential for different image processing routines at a higher solid content.
A suspension density limit for the applied techniques cannot be generally determined. The measured optical density on pixel ratios does not necessarily match with the mass-based suspension density, but it can identify trends. The optical suspension density is mutually connected to the particulate state, such as size, distribution, and particle shape, and it must be evaluated for each system individually.
It was shown that the shadowgraphic probe is capable of monitoring the transient evolution of the PSD in a crystallization processes, with an extended range of operation conditions, and was compared to an established online bypass variant and sieve analysis. While bypass variants mainly suffer from blockage at high temperatures and supersaturations, the shadowgraphic probe can be applied under these conditions. In view of industrial application, it is desirable to extend the range of operation up to industrial conditions, i.e., suspension density, temperature, pressure, and chemical resistance. It is well known that image analysis fails at a high solid content, but mathematical algorithms (e.g., neuronal networks) have significantly developed in the recent years to overcome this gap. Hence, it is desirable to enhance the analysis range to industrially relevant conditions (e.g., larger suspension densities). With endoscopic probes, in combination with appropriate image analysis software, processes can be designed and scaled to industrially relevant size, as the development is less based on experience than on intrinsic data, including the particulate state.
In the state-of-the-art crystallization processes, the particulate phase is mostly not monitored and therefore largely unknown, which is one of the key problems in developing continuous crystallization processes.