Import CV2 Import NumPy as NP # function Cv2.pyrdown () is to reduce the image resolution to the original half img = Cv2.pyrdown (Cv2.imread ("g:/python_code/opencvstudy/ Images/timg.jpg ", Cv2. imread_unchanged) # Convert the image to grayscale, then binary ret, Thresh = Cv2.threshold (Cv2.cvtcolor (Img.copy (), Cv2. Color_bgr2gray), 127, 255, Cv2. thresh_binary) image, contours, hier = cv2.findcontours (Thresh, Cv2. Retr_external, Cv2. Chain_approx_simple) for C in contours: # bounding
Document directory
(1). projection, no displacement, 10 PX shadow size, no expansion, color # 06c
(2). Add 20 PX extension to the above
(3). Inner Shadow, no displacement, 10 PX size, no extension, color # 06c
(4). Multi-shadow effect
(5). Sequence of multiple shadow attributes
1. browser compatibility of the
To make this kind of loading, we can use only one label and then use Box-shadow to make a loading diagram.
First, you need a label:And then the CSS:
$fontSize: 30px;
$radius: 2em;
.Loading {
font-size: $fontSize;
Width:1em;
Height:1em;
border-radius:50%;
margin:100px Auto;
box-shadow:0 -2em Rgba (255, 0, 0, 1), 1.414
Final Effect Diagram:
The specific steps to create are as follows:
One, create a new document, 640 pixel wide, 480 pixel high, white background. Next, create a new layer, fill it with #e2e2e2, rename it to BG, right-click the BG layer in the Layers panel, and select Convert to Smart object. Then apply the filter (filter) noise (noise) add noise (add noise) command to the layer. The parameters are set as shown in the following illustration:
Second, create a new layer, n
Final Effect Diagram:
Click to download this tutorial PSD source file
The specific steps to create are as follows:
One, create a new document, 640 pixel wide, 480 pixel high, white background. Next, create a new layer, fill it with #e2e2e2, rename it to BG, right-click the BG layer in the Layers panel, and select Convert to Smart object. Then apply the filter > Noise (Noise) > Add noise (Add noise) command to the layer. The parameters are set as shown in the following illustration
If you want to implement the above interface, it will generally show inconsistent with the expected, although we set the color is the same. The following steps can be implemented:1. Turn off the transparency of Navigationbar self. Navigationcontroller . Navigationbar . Translucent = NO ;2. Using the digital color measuring meter, the navigation bar color of the RGB, again set the navigation bar color and the following view background color.3. Remove the gray split line below the navigation ba
IOS removes the border black line amp; in the navigation bar and removes the border black line in the search box and the shadow in the text input box-Solution
Remove the black line from the navigation bar
In viewDidload:
[Self. navigationController. navigationBar setBackgroundImage: [[UIImage alloc] init] forBarMetrics: UIBarMetricsDefault]; self. navigatio
IOS removes the border Gray Line in the navigation bar; Removes the border Gray Line in the search box and the text box shadow.
To implement the above interface, the display is usually inconsistent with the Expected One, although the color we set is the same. You can perform the following steps:
1. Disable the transparency of navigationBar
Self. navigationContr
Let's take a look at some of the rounded-arrow rectangle's Tip box effect chart that we've seen
First, understand Cgcontextref
First of all need to understand the Cgcontextref, the author has the opportunity to further explain in detail, this article in a simple introduction, convenient reading comprehension. Understand the Cgcontextref coordinate system first
Coordinates
Example: For the mall-type app has a lot of original price, the current
Set the View to display only the transparent bottom border, transparent background box, and shadow background box.
The implementation result is as follows:
The following code implements an xml with a border, which is very common.
The following shows only the xml of the lower border
The following is the background of the s
Optional. The color of the shadow.
Inset
Optional. Change shadow inner Shadow from Outer shadow (start)
Border Picture: Border-imageWith the CSS3 Border-image property, you can create a border with an image, and the Border-image property allows you to specify a picture as the border
Remove the border black line from the navigation barIn Viewdidload: [Self.navigationController.navigationBar Setbackgroundimage:[[uiimage alloc] init] Forbarmetrics: Uibarmetricsdefault]; Self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];Remove the border black line from the search boxIn Viewdidload:[Self.textsearchbar Setbackgroundimage:[[uiimage alloc] init]];Remove the shadow from the text input
-right-radius:50%;}
Take this for a while. border-top-left-radius: 50%
In fact, it is equivalent to sitting on the element box to draw a rectangle, the width of the rectangle is half the element (50%)and draws an arc at the center of the point close to the interior of the elementSo four attributes together, it becomes a circle.
This property can also be more co
Code-only use CSS3 rounded border and box shadow to create iphone EffectsCss3 brings us a lot of visual feelings and changes. A lot of code can be implemented for the previous operations on images. The following is a brief introduction of the two most common corner borders and box shadows. We also attach an iphone effect to provide you with exercises. 1. border-r
The Box-shadow property contains 6 parameter values: Shadow Type, x-axis displacement, y-axis displacement, shadow size, shadow extension, and shadow color. These 6 parameter values can be omitted selectively.Now we use an IMG ele
I. Definition and usageThe Box-shadow property adds one or more shadows to the box.second, the grammarBox-shadow:h-shadow v-shadow blur spread color inset;
H-shadow
Necessary. The position of the horizontal shadow
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.