Particle-resolved topological defects of smectic colloidal liquid crystals in extreme confinement
Author
Louis Cortes
Title
Particle-resolved topological defects of smectic colloidal liquid crystals in extreme confinement
Description
Colloidal rod detection and visualization (from https://doi.org/10.1038/s41467-020-20842-5))
Category
Academic Articles & Supplements
Keywords
colloid, rod, 2D, detection
URL
http://www.notebookarchive.org/2021-02-8sy4sy7/
DOI
https://notebookarchive.org/2021-02-8sy4sy7
Date Added
2021-02-19
Date Last Modified
2021-02-19
File Size
6.09 megabytes
Supplements
Rights
CC BY 4.0
Download
Open in Wolfram Cloud
This notebook contains supplementary data for "Particle-resolved topological defects of smectic colloidal liquid crystals in extreme confinement" by René Wittmann, Louis B. G. Cortes, Hartmut Löwen and Dirk G. A. L. Aarts
Rod detection and colouring
Rod detection and colouring
Import Image
Import Image
In[]:=
image=Import[NotebookDirectory[]<>"\\size4\\01_01.tif"]
Out[]=
Crop image
Crop image
In[]:=
imageCrop=ImageTrim[image,{{600,580},{600+360*2,580+360*2}}]
Out[]=
Apply filter
Apply filter
In[]:=
imageFilter=FourierDCTFilter[imageCrop,0.1]
Out[]=
Binarize
Binarize
In[]:=
im1=LocalAdaptiveBinarize[imageFilter,localadr,localadp]
Out[]=
Select component by area and elongation
Select component by area and elongation
In[]:=
sel1=SelectComponents[im1,30<#Area<500&&#Elongation>0.87&]
Out[]=
Polar transformation
Polar transformation
ImgPolarT[img_]:=({center,radius}={ImageDimensions[img]/2,ImageDimensions[img][[1]]/2};polar=ImageTransformation[img,center+{Cos[#[[1]]],Sin[#[[1]]]}*#[[2]]&,{2Piradius,radius},DataRangeFull,PlotRange{{0,360°},{1,radius}}])
In[]:=
flat=ImgPolarT[sel1]
Out[]=
Measure orientation
Measure orientation
In[]:=
mes=ComponentMeasurements[flat,"Orientation"];(*Findlayerorientation*)(*Transformorientationbetween{-π,π}to{-π/2,π/2}*)mes[[All,2]]=If[#<0,#+π,#]&/@mes[[All,2]];mes[[All,2]]=If[#>π/2,#-π,#]&/@mes[[All,2]];mes[[All,2]]=((mes[[All,2]]+π/2)/π);(*Transformorientationbetween{-π/2,π/2}to{0,1}*)mes[[All,2]]=If[#0,0.00001,#]&/@#&/@mes[[All,2]];(*Replace0valuesby0.0001,0willbeuseforthebackground*)PrependTo[mes,00];(*Usedtomakethebackgroundblack*)Dlaymod=Sequence@@#&/@#&/@((Nearest[mes,#])&/@MorphologicalComponents[flat]);(*Replacethemorphologicalcomponentvaluesbythemeasuredorientationatthelocation*)col=Colorize[Image[Dlaymod],ColorFunction->Function[{x},Hue[x]],ColorRules{0Black}]
Out[]=
Transform back
Transform back
reversetransformation[img_]:=ImageTransformation[img,{ArcTan@@(radius-#),Norm[#-radius]}&,{2radius,2radius},DataRange{{-180°,180°},{1,radius}},PlotRange{{0,2radius},{0,2radius}}]
In[]:=
col1=reversetransformation[col]
Out[]=
Assemble with original image
Assemble with original image
(*Usedtohomogenizebrightnessbetweenimages*)refhistogram=ImageAdjust[imageCrop];
In[]:=
imdim=ImageDimensions[imageCrop];col1=ImageTake[col1,{1,imdim[[2]]},{1,imdim[[1]]}];3/4*col1+3/4ColorNegate[Binarize[col1,0.1]]*HistogramTransform[imageCrop,refhistogram]
Out[]=
Cite this as: Louis Cortes, "Particle-resolved topological defects of smectic colloidal liquid crystals in extreme confinement" from the Notebook Archive (2021), https://notebookarchive.org/2021-02-8sy4sy7
Download