Controlling the Light: Brightness Adjustment with NumPy! 💡🌓 Day 87/100 In Computer Vision, light isn't a feeling it's an addition. For Day 87 of my #100DaysOfCode journey, I explored the mathematics of Exposure and Brightness. I learned that making a photo 'pop' is actually a simple matter of scalar addition across a 3D matrix. But the real skill lies in Clipping ensuring the math doesn't break the boundaries of 8-bit color depth. Technical Highlights: 💡 Scalar Offsetting: Using NumPy broadcasting to shift the global intensity of an image by adding or subtracting constant values. 🛡️ Value Clipping: Implementing np.clip to prevent numerical overflows, ensuring pixels never exceed 255 or drop below 0. ⚡ Performance Vectorization: Avoiding slow Python loops and using direct array operations for real-time image manipulation. 🤖 Preprocessing for AI: Understanding how brightness normalization helps ML models recognize objects in varying lighting conditions. Do check my GitHub repository here : https://lnkd.in/d9Yi9ZsC #100DaysOfCode #ComputerVision #NumPy #Python #BTech #IILM #AIML #ImageProcessing #DataScience #SoftwareEngineering #LearningInPublic #WomenInTech
NumPy Brightness Adjustment with Scalar Offsetting and Clipping
More Relevant Posts
-
The Magic of the Mirror: Image Flipping with NumPy! 🤳🔄 Day 85/100 Ever wondered how your phone 'mirrors' your selfies instantly? It’s just one line of array slicing! For Day 85 of my #100DaysOfCode, I explored Image Flipping and Mirroring. In the world of Computer Vision, an image is just a matrix, and to flip it, we simply reverse the order in which we read the rows or columns. Technical Highlights: 🔄 Axis Reversal: Mastering the [::-1] slicing syntax to reverse array indices without complex loops. 🤳 Mirror Logic: Implementing horizontal flips to simulate the front-camera 'selfie' experience. 🌊 Vertical Reflection: Creating water surface reflection effects by reversing the row order of 2D matrices. 🤖 AI Data Augmentation: Learning how flipping images is used in Machine Learning to double the size of training datasets and prevent model bias. Do check my GitHub repository here : https://lnkd.in/d9Yi9ZsC #100DaysOfCode #ComputerVision #NumPy #Python #BTech #IILM #AIML #ImageProcessing #DataAugmentation #SoftwareEngineering #LearningInPublic #WomenInTech
To view or add a comment, sign in
-
-
Day 49 of #GeekStreak60: The Math Behind the Matrix! 🧮🔲 Tackled the "Print Diagonally" problem on @GeeksforGeeks today. Key Learning: When traversing a matrix, it's easy to get bogged down in complex boundary checks and nested while loops. But analyzing the actual coordinates reveals a mathematical shortcut: along any anti-diagonal, the sum of the row and column indices (i + j) is always constant! Instead of writing a messy simulation, I used this property to iterate through all possible index sums (from 0 to 2n - 2). By calculating the strict upper and lower bounds for the rows at each sum, the algorithm perfectly extracts the anti-diagonals in pure O(n²) time without a single out-of-bounds check. Algorithms become so much cleaner when you step back and look for the underlying math! 🚀 #geekstreak60 #npci #coding #Algorithms #Python #DataStructures #Matrix #Mathematics #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 48 of My Learning Journey Today, I explored two important NumPy functions: identity() and eye() 📊 🔹 identity() Creates a square matrix Main diagonal elements are 1, rest are 0 Useful for mathematical and matrix operations 🔹 eye() More flexible than identity() Can create rectangular matrices Allows shifting the diagonal using parameter k k = 0 → main diagonal k > 0 → upper diagonal k < 0 → lower diagonal 💻 Example: np.identity(3) → 3×3 identity matrix np.eye(3, 4) → 3×4 matrix with diagonal 1s ✨ Key Learning: Understanding these functions helps in working with matrices efficiently, especially in linear algebra and data science applications. 📌 Consistency is the key—small steps every day lead to big results! #Day48#Python #NumPy #LearningJourney #DataScience #Coding #StudentLife
To view or add a comment, sign in
-
-
The Math of the 'Negative' Effect: NumPy Broadcasting! 🌈🔄 Day 82/100 Ever wondered how a photo filter actually works? It’s just simple subtraction! 🏗️ For Day 82 of my #100DaysOfCode, I dived deeper into Image Processing. Today, I built a Color Inverter using strictly NumPy. The logic is fascinating: since digital colors are stored as integers from 0 to 255, you can create a 'Negative' effect by simply subtracting the entire image matrix from the value 255. Technical Highlights: 🔢 Broadcasting Mastery: Leveraging NumPy's ability to perform a scalar-to-matrix subtraction (255 image) without a single for loop. 🔄 Color Inversion Logic: Transforming RGB values to their mathematical opposites to create a high contrast negative effect. 🖼️ Visual Comparison: Using Matplotlib subplots to demonstrate the transformation from a linear gradient to its inverted counterpart. ⚡ Performance Engineering: Understanding how vectorized operations make real-time image filtering possible on standard hardware. Do check my GitHub repository here : https://lnkd.in/d9Yi9ZsC #100DaysOfCode #NumPy #Python #BTech #IILM #ComputerScience #AIML #ImageProcessing #SoftwareEngineering #Mathematics #LearningInPublic #WomenInTech
To view or add a comment, sign in
-
-
RAG Day 4: Vector Databases and Indexing Excited to share my latest project from Day 4 of my RAG Learning series: Building a Hybrid Search Engine! 🚀 This hands-on mini-project compares semantic-only, keyword-only (BM25), and hybrid retrieval methods using vector databases like FAISS-inspired indices. It incorporates metadata filtering, reciprocal rank fusion, and efficient indexing techniques to handle document search at scale. Key takeaways: Vector databases are crucial for storing and querying embeddings efficiently, balancing speed, accuracy, and memory. Perfect for prototyping RAG systems! #RAG #VectorDatabases #MachineLearning #Python #AI #SearchEngine Source code: https://lnkd.in/gZwinm3i
To view or add a comment, sign in
-
-
Day 12 of my AI & Data Science Journey Today, I learned about loops in programming and how they help automate repetitive tasks. What I explored: for loop (used when the number of iterations is known) while loop (used when the condition controls execution) nested loops (loop inside another loop) loop control statements: break (to exit the loop) continue (to skip an iteration) 📊 Practiced writing programs using these loops to simplify repetitive operations and improve efficiency. Key Insight: Loops are powerful tools that reduce code repetition and make programs more efficient and dynamic. Mastering loops is essential for solving complex problems in programming. #Python #Programming #AI #DataScience #LearningJourney #Coding #ProblemSolving #Consistency
To view or add a comment, sign in
-
The Art of Focus: Mastering Image Cropping with NumPy! 🎯✂️ Day 86/100 In a world of data noise, the ability to focus on what matters is a superpower. For Day 86 of my #100DaysOfCode journey, I explored Region of Interest (ROI) Extraction. In Computer Vision, we don't always need the full picture. By using NumPy Array Slicing, I can 'zoom in' on specific coordinates to isolate faces, text, or objects for further analysis. Technical Highlights: 🎯 ROI Identification: Mastering the coordinate system to pinpoint and extract sub-matrices from large image arrays. ✂️ Precision Slicing: Leveraging Python's [start:stop] syntax to perform lossless cropping in microseconds. ⚡ Computational Optimization: Learning why reducing image size via cropping is the first step in high-speed object detection. 🤖 AI Preprocessing: Understanding how cropping helps prepare datasets for deep learning models by removing irrelevant background noise. Do check my GitHub repository here : https://lnkd.in/d9Yi9ZsC #100DaysOfCode #ComputerVision #NumPy #Python #BTech #IILM #AIML #ImageProcessing #DataScience #SoftwareEngineering #LearningInPublic #WomenInTech
To view or add a comment, sign in
-
-
Recently, I worked on a small machine learning project on Fitness Class Attendance Prediction. The goal was to predict whether a member would attend a class or not, using a complete workflow from raw data to final model evaluation. The project included: cleaning inconsistent data formats handling missing values encoding categorical variables preparing preprocessing pipelines training and comparing multiple models I tested: KNN, Decision Tree, SVM, and Naive Bayes What I found interesting was that the “best” model depended on how performance was judged: Naive Bayes gave the best F1-score on the main split SVM gave the highest accuracy Decision Tree looked like the most stable option when the test size changed A good reminder that model selection should not depend on one metric only. Github Repo: https://lnkd.in/d8_ADgY5 Projects like this keep showing me how important it is to combine clean data, correct preprocessing, and thoughtful evaluation to reach a solid conclusion. #MachineLearning #DataAnalytics #Python #ScikitLearn #ClassificationModels #DataScienceProjects
To view or add a comment, sign in
-
-
🚀 Day 45 of My Learning Journey – NumPy Shape & Reshape Today, I explored how to work with array dimensions using NumPy, focusing on shape and reshape. 🔹 Key Learnings: ✔️ shape Helps to identify the dimensions of an array Example: (3, 2) → 3 rows and 2 columns ✔️ Modifying shape We can directly change the structure of an array Useful when reorganizing data ✔️ reshape() Creates a new array with a different shape Does NOT modify the original array Very helpful in data preprocessing 🔹 Hands-on Task Completed: Converted a list of 9 elements into a 3×3 matrix using NumPy. 💡 Takeaway: Understanding how to manipulate array dimensions is essential for data analysis, machine learning, and efficient problem-solving. 📌 Every small concept builds a stronger foundation! #Day45 #Python #NumPy #LearningJourney #DataScience #Coding #StudentLife
To view or add a comment, sign in
-
-
📊 Project Showcase: Student Performance Predictor Developed a machine learning model to predict student academic performance using features like study time, absences, and parental support. 🔧 Implementation: • KNN Algorithm • Data preprocessing & scaling • Model deployment using Flask • Frontend integration with React This project demonstrates end-to-end ML workflow from data to deployment. 🔗 GitHub Repository: https://lnkd.in/dkwmXV-n #DataScience #MachineLearning #AI #Python #ProjectShowcase
To view or add a comment, sign in
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development