Getting the Color of the Lips using face API - face

The Face API gives coordinates of the lips but can we specifically get the color of the lips?

There's one property that you might find useful: faceAttributes.makeup.lipMakeup. But, it's just a boolean. You get it by adding makeup to the returnFaceAttributes parameters.

Related

How can I know that plt.colorbar must "eat" ax.pcolor?

Consider the following code:
#%%
Z=np.random.rand(len(X),len(Y))
X=np.arange(0,10)
Y=np.arange(0,10)
[fig1,ax1]=plt.subplots()
pcm=ax1.pcolor(X,Y,Z,cmap='seismic',edgecolors='black')
plt.colorbar(pcm,extend='max')
#[fig1,ax1]=plt.subplots()
#ax1.pcolor(X,Y,Z,cmap='seismic',edgecolors='black')
#plt.colorbar(extend='max')
The uncommented part works while the commented one doesnt. The error returned being:
RuntimeError: No mappable was found to use for colorbar creation. First define a mappable such as an image (with imshow) or a contour set (with contourf).
Looking at the documentation, it is said:
The matplotlib.cm.ScalarMappable (i.e., Image, ContourSet, etc.)
described by this colorbar. This argument is mandatory for the
Figure.colorbar method but optional for the pyplot.colorbar function,
which sets the default to the current image.
In this case, pcm correspond to the return value of ax1.pcolor() which type is "matplotlib.collections.Collection" and doesn't appear in the (non exhaustive) list given by the documentation.
How could I know from the documentation that I would indeed have to provide to plt.colorbar ax1.pcolor ? I know this from a stackoverflow post. How could I guess this from reading at the documentation ?

Line_width not working in Vulkan

I enabled wide_line feature in VkPhysicalDeviceFeatures and i am giving appropriate value in pRasterizationState as well. But i dont see the width increased for the lines. What am I missing here?
Does the implementation support wide lines? Check the value of VkphysicalDeviceFeatures:: wideLines you get from vkGetPhysicalDeviceFeatures. Also check the lineWidthRange and lineWidthGranularity in VkPhysicalDeviceLimits.
Are you setting VK_DYNAMIC_STATE_LINE_WIDTH in VkPipelineDynamicStateCreateInfo::pDynamicStates? If so, you need to set the line width using vkCmdSetLineWidth rather than VkPipelineRasterizationStateCreateInfo::lineWidth.

Rebol 3 - R3-GUI - How to access text from an area?

I'm struggling a lot coming from R2 and dealing with faces. get-facet seems extremely unintuitive to me.
Let's say I have an area:
view [c: area "hello"] print get-facet c 'text-edit
get-facet always returns "hello" even if I type something else in the area. What is going on with this? The 'caret and 'state facet objects contain the correct text, but I cannot find a way to access them.
The correct command is get-face. Get facet should be used for
For the example above, it is fixed by:
view [c: area "hello"] print get-face c
From an explanation from Cyphre: get-face is intended for the application programmers but get-facet is intended for style developers because it directly accesses the style internals. If styles are updated it may break code if get-face is not used. One should avoid using refinements such as /text or /data on faces as it was easy to do in R2
AREA's facet TEXT-EDIT looks like it just stores the initialization, and the state/caret facet objects contain run-time data

Semantic mediawiki - Set propery to range of values

I'm trying to set a specific property to a non exact value, for example say that I want to define the height of a pine tree to usually between 3-80 m (according to wikipedia). Then I would like to set something like [[Has height::3-80]] (of course this doesn't work) and defining the unit to meters with "custom units". Then I would like to be able to query for example "trees that can reach the height of 70 meters" and the pine tree would be included. I've been searching and trying different angles for hours now and I can't figure it out. Tried with #set_recurring_event but that seems to be only for dates/time. Also understood how to set multiple values for a property with #arraymap but this doesn't seem to help me here. Really would appreciate help with this (it's probably very easy and right in front of me) Thx! COG
There's no such things. But you able to create template, with parameters you want. The you just use code kinda {{range|min|max|units}}. For example your range of heights looks like {{range|3|80|m}}.

What does setTextMatrix of contentByte class in iText do?

I am using iText and am very new to it. There have been several situations where I think I could have figured out the problem with my code if I knew what I was doing - I use examples without knowing the workings behind the code, and even as I look at the source I can't figure out what the programmer was thinking.
What does setTextMatrix of contentByteArray in iText do? And how do I figure out the parameter values I need?
For example:
cb.setTextMatrix(1, 0);
The input parameters are x,y coordinates in points, unless CTM scaling was defined.
0,0 would be the bottom left of the template you are referencing.
The position is the 'baseline' of the text, rather than the top or the bottom.
Transcribed from this source:
https://sourceforge.net/p/itext/mailman/message/12855218/
first parameter sets left margin, second parameter sets bottom margin.