Normal view
Interiors by design: The Dutch Golden Age
Painting in the Dutch Golden Age underwent remarkable evolution. In the fifty years between the 1620s and the French invasion of the Dutch Republic in 1672, established genres grew novel sub-genres, with artists specialising in each. These included ‘genre’ scenes of everyday life, with artists devoted to painting taverns, women working, festivities, markets, or domestic interiors. The latter appear to have been among the first such depictions in modern art.
During the 1650s, interiors started to become distinct from other scenes of everyday life, as the significance of their figures diminished, although few if any dispensed with them altogether.
Gerard ter Borch (1617–1681) specialised in domestic interiors, some containing open-ended narratives to encourage the viewer to speculate on their resolution. Two centuries later, those were to be become popular again, particularly in Britain, where they were known as problem pictures and featured in the press.
Ter Borch’s The Messenger, usually know as Unwelcome News, from 1653, develops his favourite theme of the arrival of a message. The young man at the left is still booted and spurred from riding to deliver a message to this couple. Slung over his shoulder is a trumpet, to announce his arrival and assert his importance. The recipient wears a shiny breastplate and riding boots, and is taken aback at the news the messenger brings. His wife leans on her husband’s thigh, her face serious.
The scene is the front room of a house in the Golden Age. Behind them is a traditional bed typical of living areas at the time, with some of their possessions resting on a table between the couple and their bed. Hanging up on a bedpost is the husband’s sword, and behind them are a gun and powder horn. Is this letter news of his recall to military service, perhaps? Will he soon have to ride away from his wife, leaving her alone to bring up their family?
Although the three figures take the limelight, ter Borch picks out the mundane details of the room behind them instead of letting them fade into darkness.
Three Figures Conversing in an Interior is another of ter Borch’s narrative genre works, and more popularly known as Paternal Admonition (c 1653-55). Standing with her back to us, wearing a plush going-out dress, is the daughter. To her left is a table, on which there’s a small reading stand with books, almost certainly including a Bible.
Her parents are young, and they too are fashionably dressed. Her mother appears to be drinking from a glass, but her father is at the very least cautioning his daughter, if not giving her a thorough dressing-down. He wears a sword at his side. Behind them is a large bed, and to the right the family dog looks on from the darkness.
Ter Borch’s half-sister Gesina appears to have been his model for Woman Writing a Letter (c 1655), which makes obvious his connection with Vermeer. Move this woman to a desk lit through windows at the left, light her surroundings, and you have a painting similar to Vermeer’s interiors. This shows a heavy decorated table cover pushed back to make room for the quill, ink-pot, and letter. Behind the woman is her bed, surrounded by heavy drapery, and at the lower right is the brilliant red flash of the seat.
The Letter from about 1660-62 returns to ter Borch’s favourite theme of the reading and writing of letters. Two young women are working together, apparently replying to the letter being read by the woman on the right. A boy, perhaps their younger brother, has just brought in a tray bearing an ornate pitcher of drink. In front, a small dog is curled up asleep on a stool. Above them is an unlit chandelier suspended from a hanging ceiling.
Other specialists in genre painting like Gabriël Metsu also ventured towards interiors. His Washerwoman from about 1650 looks authentic and almost socially realist: the young woman is a servant, dressed in her working clothes, in the dark and dingy lower levels of the house. She looks tired, her eyes staring blankly at the viewer. She’s surrounded by the gear she uses, including a rope and pitcher to the right, and an earthenware bowl on display below it. The mantlepiece in the background features a blue and white plate.
It’s easy to mistake Pieter de Hooch’s A Woman Drinking with Two Men from about 1658 for a Vermeer, and like the latter he decorates the far wall with a contemporary map. The Eighty Years’ War had not long ended, and the Dutch Republic was flourishing. Discarded objects are scattered on its black-and-white tiled floor. There’s a large and empty fireplace, and above it hangs a religious painting.
It was Jan Vermeer whose few surviving works explored interiors the most.
In his Milkmaid from about 1660, a woman servant is pouring milk from a jug, beside a tabletop with bread. In the left foreground the bread and pots rest on a folded Dutch octagonal table, covered with a mid-blue cloth. A wicker basket of bread is nearest the viewer, broken and smaller pieces of different types of bread behind and towards the woman, in the centre. Behind the bread is a dark blue studded mug with pewter lid, and just in front of the woman (to the right of the mug) a brown earthenware ‘Dutch oven’ pot into which the milk is being poured. An ultramarine blue cloth (matching the woman’s apron) rests at the edge of the table. There are many other intriguing details in this interior.
Vermeer’s Young Woman with a Water Pitcher from slightly later is another fine example, this time with more obvious control of focus effects for which his paintings are renowned. Details in this interior include the ornate tablecloth, a small lockable chest on the right of the table, the map hanging behind, and the window she is holding with her right hand.
Interiors then vanished from painting until their rebirth in the nineteenth century.
大津算法(OTSU)
在图像处理领域,我们会遇到如下需求:把图像中的目标物体和背景分开。比如背景用白色表示,目标物体用黑色表示。此时我们知道目标物体的灰度值相互接近,背景灰度值相互接近,那么用大津算法能很好把目标从背景当中区分开来。
算法思想
目标
比如对于下面这张灰度图片
目标物体是中间黑色的几何物体,我们想让这些物体和背景区分更明显一些,比如让物体为纯黑,背景全白。那么我们就需要找到一个合适的阈值,使图片上灰度值大于这个阈值的像素点为255(白色),灰度值小于阈值的像素点为0(黑色)。也就是变成下面这幅图:
那么大津算法需要处理的就是找到最佳的阈值,让目标和物体尽可能分离开。
灰度直方图
为了找到合适的阈值,我们首先观察原图的灰度直方图📊:
这是用 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;
}