Reading view

There are new articles available, click to refresh the page.

A Painted Weekend in Amsterdam: 1645-1867

This weekend, as my series on painting in the Dutch Golden Age draws to a close, it’s time to pay a visit to the city of Amsterdam, centre of trade and commerce, and one of the most multicultural cities in Europe since the seventeenth century. At the start of this selection of paintings of its canals and buildings, its population was around 170,000, and by the end of tomorrow’s sequel that had reached over 650,000.

vanderpoelfirenieuwekerk
Egbert van der Poel (1621–1664), The Fire in the Nieuwe Kerk, Amsterdam, in 1645 (c 1645), brush and gray wash and black wash with touches of pen and brown ink, 12.5 × 19.4 cm, location not known. Wikimedia Commons.

Egbert van der Poel established his reputation painting major fires in the Dutch Republic. Although it has been claimed that these were seldom based on his personal observations, this sketch of The Fire in the Nieuwe Kerk, Amsterdam, in 1645, was made in front of the motif using washes with touches of pen and brown ink. Perhaps he was the first ‘ambulance chaser’ who travelled out to sketch fires, from which he painted his famous brandjes in the studio.

Aert van der Neer (c 1604–1677), Fire in Amsterdam by Night (date not known), oil on canvas, 58.8 x 71.7 cm, Statens Museum for Kunst (Den Kongelige Malerisamling), Copenhagen, Denmark. Wikimedia Commons.

At some stage, Aert van der Neer also started painting destructive fires, including this undated Fire in Amsterdam by Night. This shows one of the broader canals in the city, with residents already taking to boats in case they needed to evacuate.

beerstraatenoldtownhallamsterdam
Jan Abrahamsz Beerstraaten (1622–1666), The Old Town Hall of Amsterdam on Fire, 7 July 1652 (1652-55), oil on panel, 89 x 121.8 cm, Amsterdam Museum, Amsterdam, The Netherlands. Wikimedia Commons.

In the summer of 1652, Jan Abrahamsz Beerstraaten seems to have witnessed the destruction by fire of part of the centre of Amsterdam, which formed the basis of his studio painting of The Old Town Hall of Amsterdam on Fire, 7 July 1652 (1652-55). Local inhabitants are walking in orderly queues to boats, in which they escape from the scene.

Gabriel Metsu (1629–1667), The Vegetable Market in Amsterdam (c 1660-61), oil on canvas, 97 x 84 cm, Musée du Louvre, Paris. Image by Shonagon, via Wikimedia Commons.

Gabriel Metsu followed the subjects of his genre paintings beyond the home, here into The Vegetable Market in Amsterdam in about 1660-61. The mistress stands with a metal pail on her arm, detached from the housekeeper to the left of centre, who is bargaining with one of the vendors. Other figures are drawn from a broad range of classes, and there’s produce ranging from cauliflowers to chickens.

hobbemahaarlemlock
Meindert Hobbema (1638–1709), The Haarlem Lock, Amsterdam (1663-65), oil on canvas, 77 x 98 cm, The National Gallery, London. Wikimedia Commons.

Meindert Hobbema’s view of The Haarlem Lock, Amsterdam from 1663-65 shows a working lock with a raising bridge, and the masts of many ships in the harbour beyond. This lock may form the entrance to the Haarlemmertrekvaart, a canal dug in 1631 to facilitate transit by boat between Amsterdam and the city of Haarlem to its east.

Jan van der Heyden (1637–1712), View of the Herengracht, Amsterdam (c 1670), oil on canvas, 33.5 x 39.7 cm, Private collection. Wikimedia Commons.

Jan van der Heyden’s View of the Herengracht, Amsterdam from about 1670 shows this canal that has become famous for its large and elegant houses. These were built from 1612, and are finest along this section known as the Golden Bend. Below is a contrasting view from 1672, in Gerrit Adriaensz Berckheyde’s The Bend in the Herengracht near the Nieuwe Spiegelstraat in Amsterdam.

Gerrit Adriaensz Berckheyde, The Bend in the Herengracht near the Nieuwe Spiegelstraat in Amsterdam, 1672, oil on panel, 40.5 x 63 cm, Rijksmuseum, Amsterdam. Wikimedia Commons.
Gerrit Adriaensz Berckheyde (1638–1698), The Bend in the Herengracht near the Nieuwe Spiegelstraat in Amsterdam (1672), oil on panel, 40.5 x 63 cm, Rijksmuseum, Amsterdam. Wikimedia Commons.
Thomas Heeremans (1641–1694) and Abraham Storck (1644-1708), Winter Landscape with the Montelbaanstoren, Amsterdam (1676), oil on canvas, 76 x 108.5 cm, Private collection. Wikimedia Commons.

In 1676, Thomas Heeremans and Abraham Storck joined forces to paint this Winter Landscape with the Montelbaanstoren, Amsterdam. The Montelbaanstoren is the prominent tower in the left foreground, and the canal seen is the Oudeschans. The tower was built in 1516 as part of the city’s defences, and its upper section was extended in 1606, bringing it to a height of 48 metres (almost 160 feet).

Gerrit Adriaenszoon Berckheyde (1638–1698), The Nieuwezijds Voorburgswal, Amsterdam (1686), oil on canvas, 54 x 64 cm, Museo Nacional Thyssen-Bornemisza, Madrid, Spain. Wikimedia Commons.

Berckheyde’s The Nieuwezijds Voorburgswal, Amsterdam from 1686 shows the canal running at the rear of the City Hall that was covered over two centuries later in 1884 to create a street. The City Hall was built between 1648-65, and features an octagonal tower seen here at the right. Mounted on its roof, at the centre of the painting, is a sculpture by Artus Quellinus of Atlas supporting a celestial sphere. On the opposite bank is a small flower market. By this time the population of Amsterdam had risen to more than 220,000, many of them immigrants.

Thomas Fearnley (1802–1842), King William II’s Ceremonial Procession in Amsterdam, 27 November 1840 (1840), oil on paper, 38.5 x 43 cm, Nasjonalmuseet for kunst, arkitektur og design, Oslo, Norway. Wikimedia Commons.

The Norwegian landscape artist Thomas Fearnley appears to have visited the city late in 1840, when he painted King William II’s Ceremonial Procession in Amsterdam, 27 November 1840 in oils on paper. Neither the artist nor the king survived long after this grand event: Fearnley succumbed to typhoid in 1842, and King William II died suddenly in 1849.

leickerturbanlandscape
Charles Leickert (1816–1907), Urban Landscape (1856), oil on canvas, 87 x 119 cm, Hermitage Museum Государственный Эрмитаж, Saint Petersburg, Russia. Wikimedia Commons.

Charles Leickert is better known for his winter landscapes of frozen waterways in the Netherlands, but his Urban Landscape from 1856 shows active trading taking place beside a canal most probably in Amsterdam, where he was a member of the Royal Academy at the time.

Jacob-Emile-Edouard Brandon (1831-1897), Portuguese Synagogue at Amsterdam 22 July 1866 (1867), oil on canvas, 75.5 x 174.3 cm, Walters Art Museum, Baltimore, MD. Courtesy of Walters Art Museum.

Jacob-Emile-Edouard Brandon is one of the forgotten artists who exhibited at the First Impressionist Exhibition in 1874. One of his few surviving paintings is this Portuguese Synagogue at Amsterdam 22 July 1866 from 1867, which was awarded a medal at the Salon of that year. This was probably Europe’s most famous and picturesque synagogue at the time. The sermon was being delivered by the distinguished Talmudist David de Jahacob Lopez Cardozo (1808-1890), who was appointed ab bet din there in 1839.

大津算法(OTSU)

在图像处理领域,我们会遇到如下需求:把图像中的目标物体和背景分开。比如背景用白色表示,目标物体用黑色表示。此时我们知道目标物体的灰度值相互接近,背景灰度值相互接近,那么用大津算法能很好把目标从背景当中区分开来。

算法思想

目标

比如对于下面这张灰度图片

origin

目标物体是中间黑色的几何物体,我们想让这些物体和背景区分更明显一些,比如让物体为纯黑,背景全白。那么我们就需要找到一个合适的阈值,使图片上灰度值大于这个阈值的像素点为255(白色),灰度值小于阈值的像素点为0(黑色)。也就是变成下面这幅图:

output

那么大津算法需要处理的就是找到最佳的阈值,让目标和物体尽可能分离开。

灰度直方图

为了找到合适的阈值,我们首先观察原图的灰度直方图📊:

histogram

这是用 Matlab 对原图形成的灰度直方图,灰度直方图的含义是统计图像中不同灰度值的分布情况。由图我们可以看出两个尖峰,在灰度值为0~20的地方存在一个尖峰,代表原图中有大量像素点灰度值为0~20,经观察我们可以认为这部分对应于目标物体。同理我们可以看出背景的灰度值大多集中于100~140之间,为了让目标和背景区分更加明显,我们想让目标物体的灰度值全为0,背景的灰度值全为255,这种处理手法也称为二值化法。

那么阈值取多少合适呢?从图上看似乎取50~100中的任意一点都可以,但是实际情况并不想参考图那样明显,有些图片背景和目标物体较为接近,我们需要一个算法来找到最优阈值才行。

聚类

首先我们思考什么样的东西才能成为一类,而我们又是怎么分类的。对于参考图来说,我们可以认为灰度值接近的为一类,灰度值不接近的不是同一类。那我们又是如何衡量灰度值接近的程度呢?这里面就需要用到方差的概念。
方差相比大家都了解,同一类的物体方差小,不同类的物体方差大。所以对于此图我们希望分类的结果是对于灰度值相近的同一类物体,它的方差最小,称为类内方差最小。灰度值不接近的不同类物体,它的方差大,称为类间方差最大。

步骤

所以步骤总结如下:
首先我们要形成参考图的灰度直方图,这样方便我们找到最佳阈值。
接下来我们通过穷举每一个灰度值,计算以此为阈值的类内和类间方差。
找到能形成类内方差最小的或类间方差最大的阈值,这个就是我们要找的最佳阈值。

算法

下面以两类分割讲解下具体的算法,实际上大津算法可以分割多类出来。

因为 Medium 不支持显示 MathJax 语法的公式,所以对这部分感兴趣的直接移步到《大津算法(OTSU)》查看吧。

代码实现

C语言实现

/* OTSU 算法
* *src 存储灰度图像,width 图像宽,height 图像长
* 返回最佳阈值
*/
int otsu(const int *src, int width, int height)
{
int histogram[256]; //存储灰度直方图,这里为256色灰度
int t,thred;
float wf,wb,ub,uf,curVal,maxVal;
int sumb=0,sumf=0,sumW=0,sumPixel=width*height;
wb=wf=maxVal=0.0f;

//求灰度直方图
memset(histogram,0,sizeof(histogram));
for(i=0;i<width*height;i++)
{
histogram[src[i]]++;
}

for (i=0;i<256;i++)
sumW+=i*histogram[i];

//枚举每个灰度
for(t=0;t<256;t++)
{
//求两类类概率密度
wb+=histogram[t];
wf=sumPixel-wb;
if (wb==0||wf==0)
continue;

//求类均值
sumb+=i*histogram[t];
sumf=sumW-sumb;
ub=sumb/wb;
uf=sumf/wf;

//求当前类间方差
curVal=wb*wf*(ub-uf)*(ub-uf);
if(curVal>maxVal)
{
thred=t;
maxVal=curVal;
}
}
return thred;
}
❌