Sathwikchowdary commited on
Commit
804a381
·
verified ·
1 Parent(s): 888eb4a

Update pages/Info _of_Image.py

Browse files
Files changed (1) hide show
  1. pages/Info _of_Image.py +45 -54
pages/Info _of_Image.py CHANGED
@@ -1,4 +1,6 @@
1
  import streamlit as st
 
 
2
 
3
  # Custom CSS for styling
4
  custom_css = """
@@ -21,72 +23,61 @@ custom_css = """
21
  p {
22
  color: #FFFFFF; /* White text for paragraphs */
23
  }
24
- button {
25
- font-size: 16px;
26
- font-weight: bold;
27
- padding: 10px 20px;
28
- margin: 10px 5px;
29
- border-radius: 10px;
30
- border: none;
31
- cursor: pointer;
32
- background-color: #FF0000; /* Red button color */
33
- color: white;
34
- transition: background-color 0.3s ease; /* Smooth transition */
35
- }
36
- button:hover {
37
- background-color: #CC0000; /* Darker red when hovered */
38
- }
39
  </style>
40
  """
41
 
42
  # Inject the CSS into the app
43
  st.markdown(custom_css, unsafe_allow_html=True)
44
-
45
- # Page Content
46
  st.markdown("<h2 style='text-align: left; color: Black;'>What is IMAGE</h2>", unsafe_allow_html=True)
47
  st.markdown(
48
  "<p style='font-size: 16px; color: White; font-style: italic;'>"
49
- "An image is a visual depiction of a subject, such as a person, object, scene, or idea, created or captured through means like photography, drawing, painting, or digital tools."
50
  "</p>",
51
  unsafe_allow_html=True
52
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
- # Buttons
55
- col1, col2, col3 = st.columns(3)
56
- with col1:
57
- if st.button("Colour Space"):
58
- st.markdown("<h3 style='text-align: left; color: Gold;'>Colour Space</h3>", unsafe_allow_html=True)
59
- st.markdown(
60
- "<p style='font-size: 16px; color: White;'>"
61
- "Colour spaces define how colors are represented in an image. Common spaces include RGB (Red, Green, Blue), HSV (Hue, Saturation, Value), and LAB. "
62
- "Using OpenCV, you can convert between color spaces with functions like `cv2.cvtColor()`."
63
- "</p>",
64
- unsafe_allow_html=True
65
- )
66
-
67
- with col2:
68
- if st.button("Video Formation"):
69
- st.markdown("<h3 style='text-align: left; color: Gold;'>Video Formation</h3>", unsafe_allow_html=True)
70
- st.markdown(
71
- "<p style='font-size: 16px; color: White;'>"
72
- "To create videos, you can use OpenCV's `cv2.VideoWriter` class. It allows capturing frames and saving them as a video file. "
73
- "Specify the codec, frame rate, and resolution for the output."
74
- "</p>",
75
- unsafe_allow_html=True
76
- )
77
-
78
- with col3:
79
- if st.button("Affine Methods"):
80
- st.markdown("<h3 style='text-align: left; color: Gold;'>Affine Methods</h3>", unsafe_allow_html=True)
81
- st.markdown(
82
- "<p style='font-size: 16px; color: White;'>"
83
- "Affine transformations involve operations like scaling, rotating, and translating images. OpenCV functions like `cv2.getAffineTransform` "
84
- "and `cv2.warpAffine` are used for these tasks."
85
- "</p>",
86
- unsafe_allow_html=True
87
- )
88
-
89
- # Link to Colab
90
  st.markdown(
91
  "<p style='font-size: 16px; color: White;'>"
92
  "You can view and run the code in Colab: "
 
1
  import streamlit as st
2
+ import pandas as pd
3
+ import numpy as np
4
 
5
  # Custom CSS for styling
6
  custom_css = """
 
23
  p {
24
  color: #FFFFFF; /* White text for paragraphs */
25
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  </style>
27
  """
28
 
29
  # Inject the CSS into the app
30
  st.markdown(custom_css, unsafe_allow_html=True)
 
 
31
  st.markdown("<h2 style='text-align: left; color: Black;'>What is IMAGE</h2>", unsafe_allow_html=True)
32
  st.markdown(
33
  "<p style='font-size: 16px; color: White; font-style: italic;'>"
34
+ "An image is a visual depiction of a subject, such as a person, object, scene, or idea, created or captured through means like photography, drawing, painting, or digital tools. It can take various forms, including photographs, illustrations, artworks, or computer-generated visuals."
35
  "</p>",
36
  unsafe_allow_html=True
37
  )
38
+ st.markdown("<h2 style='text-align: left; color: Black;'>Features of IMAGE</h2>", unsafe_allow_html=True)
39
+ st.markdown(
40
+ "<p style='font-size: 16px; color: White; font-style: italic;'>"
41
+ "Pixels: Images are composed of small dots called pixels, each containing color data that together create the overall image."
42
+ "</p>",
43
+ unsafe_allow_html=True
44
+ )
45
+ st.markdown(
46
+ "<p style='font-size: 16px; color: White; font-style: italic;'>"
47
+ "File Formats: Images can be stored in different formats,"
48
+ "JPEG/JPG: Widely used for photographs and online images due to their efficient balance between quality and file size."
49
+ "PNG: Preferred for high-quality visuals or images requiring transparency, such as logos."
50
+ "GIF: Commonly utilized for basic animations or compact graphics."
51
+ "</p>",
52
+ unsafe_allow_html=True
53
+ )
54
+ st.markdown("<h2 style='text-align: left; color: Black;'>Basic Operations in IMAGE</h2>", unsafe_allow_html=True)
55
+ st.markdown(
56
+ "<p style='font-size: 16px; color: White; font-style: italic;'>"
57
+ "For performing this Basic Operations we use cv2 function from opencv library"
58
+ "cv2 is the Python module for OpenCV (Open Source Computer Vision Library), a powerful library used for computer vision and image processing tasks. It provides a wide range of tools and algorithms for analyzing and manipulating images and videos."
59
+ "</p>",
60
+ unsafe_allow_html=True
61
+ )
62
+ st.markdown("<h3 style='text-align: left; color: Black;'>Why cv2 is Used</h3>", unsafe_allow_html=True)
63
+ st.markdown(
64
+ "<p style='font-size: 16px; color: White; font-style: italic;'>"
65
+ "cv2 is used for various ways like:"
66
+ "1.Image Processing"
67
+ "2.Video Analysis"
68
+ "3.Feature Detection"
69
+ "4.Image Transformations"
70
+ "</p>",
71
+ unsafe_allow_html=True
72
+ )
73
+ st.markdown("<h3 style='text-align: left; color: Black;'>Operations Used</h3>", unsafe_allow_html=True)
74
+ st.markdown("1.imread()")
75
+ st.markdown("2.imshow()")
76
+ st.markdown("3.imwrite()")
77
+ st.markdown("4.cv2.waitkey()")
78
+ st.markdown("5.destroyallwindows()")
79
 
80
+ # Add a link to the code
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  st.markdown(
82
  "<p style='font-size: 16px; color: White;'>"
83
  "You can view and run the code in Colab: "