Colour Image Processing (Jan — May 2026)
Internal marks are now available through the menu. Please check.

About the Course

Colour Image Processing is offered as an elective course for M. Tech (CS/AI) students. The course is designed to show that colour is much more than a combination of R, G, B components and is a result of the complex interaction of the human vision system with electromagnetic radiation in the visible range of 400 – 700 nm. Such knowledge leads to better processing of colour images and developing a deeper understanding of the typical colour degradations and their enhancements.

The course covers four main topics:

  1. Colour Science
  2. Processing Colour
  3. Colour Technologies
  4. Applications

Apart from the normal lectures, students have to participate in classroom demonstrations and practical activities. It is a course combining many theoretical concepts with practical experiments and the students are required to take part in the experimental aspects as much as in the classroom lectures and demonstrations. Several jupyter notebooks are provided for these exercises.

There is no textbook for the course but most necessary material will be made available during the course at appropriate times through this course webpage.

 

Administrivia.


Instructor: Chakravarthy Bhagvati E207, AI Lab.

Class Timings:
Mondays 2:00 PM – 4:00 PM
Thursdays 2:00 PM – 4:00 PM

Assessment:
One Minor Exam: 20 Marks (Second or Third Week of April)
Two Assignments: 20 Marks each
Best two of the above three will be counted for internal assessment out of 40 marks.
Final Exam: 60 Marks (as per university rules and regulations)

Textbook:
There is no real textbook for the course but the following are useful as references.

 

Syllabus


I. Physics of Colour

 

IV. Colour Processing

II. Human Vision System

 

V. Colour Half-toning

III. Digital Colour

 

VI. Advanced Topics

 

Student List


Please check your names and inform me if there are any corrections.

S No.Roll No.Program Name
121MCME30 IMTech-VIII KOMPELLI SHIVA HARISH
222MCCE01 IMTech-VIII VINJAMURI MEHER VENKAT RAMAN
322MCCE06 IMTech-VIII PENTAMSETTY KRISHNA SATHVIK
422MCCE15 IMTech-VIII NADELLA S S S KRISHNA CHAITANYA
522MCCE17 IMTech-VIII AMBATI BHARADWAJ RAJU (CR)
622MCCE20 IMTech-VIII PRAJJWAL
722MCCE22 IMTech-VIII ABHISHEK KUMAR
822MCCE24 IMTech-VIII PRATIK SINGH
924MCMT14 M.Tech(CS) SAHIL SIDDIQUE
1024MCMT20 M.Tech(CS) PARNAB DUTTA
1125MCMI01 M.Tech(AI) HIMSHIKHA DEVI KOMALTA SEETAH
1225MCMI02 M.Tech(AI) MOHAMMED ALI MOHAMMED AL SAKKAF
1325MCMI06 M.Tech(AI) DAKARAPU ABHILASH
1425MCMI08 M.Tech(AI) PARANDA ROHITH
1525MCMI09 M.Tech(AI) K S HARISH BALAGI
1625MCMI10 M.Tech(AI) SRI REDDY JAGADISH V PAVAN SAI
1725MCMI11 M.Tech(AI) AKULA SRIKARA VIBHAS
1825MCMI12 M.Tech(AI) SIDDHARTH PANDEY
1925MCMI13 M.Tech(AI) VALIVETI GURUNATHA SREEKAR
2025MCMI15 M.Tech(AI) GEDELA UDAY KIRAN
2125MCMI16 M.Tech(AI) DASARI HARSHITHA
2225MCMI17 M.Tech(AI) AKSHAY K S
2325MCMI18 M.Tech(AI) PILLAMARI SAHIL SAGAR
2425MCMI19 M.Tech(AI) PATNAM SWADHIKA
2525MCMI22 M.Tech(AI) ARTI CHOUDHARY
2625MCMI23 M.Tech(AI) SAI GANESH KEMBURU
2725MCMI24 M.Tech(AI) RONDLA RAVI KIRAN REDDY
2825MCMI26 M.Tech(AI) J.KRISHNA CHARAN
2925MCMI27 M.Tech(AI) PATNALA VENKATA SAI HARSHITH
3025MCMI28 M.Tech(AI) KOMANDOORI DEEKSHITH
3125MCMT01 M.Tech(CS) ATTILI ABHIRAM
3225MCMT03 M.Tech(CS) HARSHAN RATHOD
3325MCMT06 M.Tech(CS) ADITYA SINGH
3425MCMT07 M.Tech(CS) VAGHMARE SIDDHARTH
3525MCMT12 M.Tech(CS) C BHANU PRABHU CHANDAN
3625MCMT13 M.Tech(CS) RIGVED PAL
3725MCMT14 M.Tech(CS) BANGARI RAKESH SAGAR
3825MCMT15 M.Tech(CS) PADALA SAI MIDHUN REDDY
3925MCMT16 M.Tech(CS) HUBLI FARA SULTANA
4025MCMT17 M.Tech(CS) DEEPAK KUMAR NIRALA
4125MCMT19 M.Tech(CS) SHANIKANT
4225MCMT22 M.Tech(CS) H LAVANYA
4325MCMT24 M.Tech(CS) ANISH PRAJAPATH
4425MCMT28 M.Tech(CS) NAGI REDDY SREEVEN REDDY
4525MCMT29 M.Tech(CS) SAI MAHIDHAR MAMIDELA
4625MCMT30 M.Tech(CS) KURHADE RUPALI SANDIP
4725MCMT31 M.Tech(CS) BODDU JOHN SUDEEP
4825MCMT32 M.Tech(CS) SUJITH KUMAR
4925MCMT35 M.Tech(CS) VEERENDRA NADH
5025MCMT36 M.Tech(CS) HARBAMON TERANG
5125MCMT41 M.Tech(CS) GAURI YOGESHWAR WANKHADE
5225MCMT42 M.Tech(CS) KETHAVATH RAJA NAYAK
5325MCMT43 M.Tech(CS) UDIT PANDEY
5425MCPC51 PhD ANMOL ADARSH

 

Assignments


Please click on the assignment links below to toggle seeing the assignments.


  Assignment - III (Due Date: 08/05/2026)
  1. This assignment consists of three questions for 20 Marks. Answer all of them.
  2. The marks are given alongside the questions.
  3. You may use any source on the Internet but should give the reference in your assignment.
  4. All programs must be in C, C++ or Python using OpenCV library.
  5. If you use any AI Tool, make sure you include the prompt given by you in the assignment. However, remember that you are being very bad to the environment! You can power 100 high-end apartments in Hyderabad for a month with the power AI tools consume in one hour.
submission instructions
  • Your assignment MUST BE DONE in a Jupyter notebook.
  • The name of the notebook must be
    <your roll number>_assignment_III
    with the roll number being in uppercase letters.
  • Every question must be done in the following manner in the notebook
    • Create a markdown cell with a copy of the question.
    • Create as many code cells as needed to implement the algorithms asked.
    • Every cell MUST HAVE a comment line as the first line(s) that say(s) what the cell contains.
    • There can be one or more markdown cells after your code to present your findings and discussions.
    • In case you are implementing your programs in C/C++, use the magic commands such as %⁠%file and %⁠%bash to show execution in the notebook.
  • The final notebook must be submitted by email with the subject CIP Assignment III to
    chakravarthybhagvati@uohyd.ac.in
    by the due date, Friday, 08 May 2026, 9:00 PM.
Follow the instructions EXACTLY as given. Otherwise, your assignment may not be graded and there will be a delay.

Questions
  1. (10 Marks)Write a program that converts a given spectrum into an RGB colour. It should have the following prototype in Python
    spectrum2rgb(<input spectrum>)
    where the spectrum is a 61x1 vector with the spectral values in 5 nm intervals from 400 nm to 700 nm (both inclusive). In C/C++, the same function has the prototype
    int spectrum2rgb(float <input spectrum[61]>)
    Now, write a program that converts an RGB triplet into a spectrum using the pseudo-inverse method that we did in class. The prototypes must be as follows:
    Python: rgb2spectrum(<rgb colour>)
    C/C++: int rgb2spectrum(int <rgb[3]>, float <spectrum[61]>)
    Compare the original spectrum with the one that you computed using the pseudo-inverse. This code requires a lot of tweaking the numbers to get RGB values and recover similar spectra. Try for 10 different Munsell Colours and write down your own observations on similarities and dissimilarities between the original and computed spectra. Hint: Read the various sources on the Internet for converting spectra into RGB colours.
  2. (6 Marks) Implement the median-cut quantisation algorithm. Use it reduce an image to 256, 128, 64, 32 and 16 colours respectively. You can try any of the images given in the previous assignment. Function prototypes:
    Python: median_cut(<input image>, <no. of colours>) The function returns the quantised image.
    C/C++: int median_cut(<input image>, <quantised image>, int <no. of colours>)
  3. (4 Marks) Briefly explain the gif image format and state precisely why it requires quantisation.

Data for the assignment

  1. Munsell Spectra Dataset (CSV format)
  2. CIE Colour Matching Functions (CSV format)
  3. D65 Spectral Data (CSV format)
    You may need to use it for normalising Munsell Spectra and get the correct RGB values. Of course, its need depends on the method you use; some methods on the Internet build it into their algorithms implicitly.

end of assignment iii

  Assignment - II (Due Date: 08/04/2026)
  1. This assignment consists of three questions for 20 Marks. Answer all of them.
  2. The marks are given alongside the questions.
  3. You may use any source on the Internet but should give the reference in your assignment.
  4. All programs must be in C, C++ or Python using OpenCV library.
  5. If you use any AI Tool, make sure you include the prompt given by you in the assignment. However, remember that you are being very bad to the environment! You can power 100 high-end apartments in Hyderabad for a month with the power AI tools consume in one hour.
submission instructions
  • Your assignment MUST BE DONE in a Jupyter notebook.
  • The name of the notebook must be
    <your roll number>_assignment_II
    with the roll number being in uppercase letters.
  • Every question must be done in the following manner in the notebook
    • Create a markdown cell with a copy of the question.
    • Create as many code cells as needed to implement the algorithms asked.
    • Every cell MUST HAVE a comment line as the first line(s) that say(s) what the cell contains.
    • There can be one or more markdown cells after your code to present your findings and discussions.
    • In case you are implementing your programs in C/C++, use the magic commands such as %⁠%file and %⁠%bash to show execution in the notebook.
  • The final notebook must be submitted by email with the subject CIP Assignment II to
    chakravarthybhagvati@uohyd.ac.in
    by the due date, Wednesday, 08 April 2026, 9:00 PM.
Follow the instructions EXACTLY as given. Otherwise, your assignment may not be graded and there will be a delay.

Questions
    1. (7 Marks) Write a program to implement dispersed-dot dithering. The program MUST be organised into the following function
      Python:  
      apply_dither_mask(<input image>, <dither_mask>, <colour_mask>)
      The return value is the output image.
      C/C++:
      int apply_dither_mask(<input image>, <output image>, <dither_mask>, <colour_mask>, int mrows, int mcols)
      mrows, mcols are the number of rows and columns respectively in the dither mask. The return value is \(0\) on success and any other value for errors.
      Experiment with \(4\times4\) and \(5\times5\) dither masks. You may use flower image and fall colours image in your experiments.

      Discuss the following based on your results

      • How did you spread the threshold values and the colour component positions?
      • Did you allocate different number of thresholds to different components? Did you think it made any difference to quality of the output?
      • Did the image resolution have an effect on the quality of the output?

    2. (6 Marks) Implement Floyd-Steinberg error diffusion algorithm for colour images. Use any method discussed either in the class or you find on the Internet. Write the method clearly as an algorithm and then show its working on the images from the previous problem. Compare your results with dithering; discuss times taken and the quality of the outputs.
    3. (7 Marks) Use any of the Bayer Colour Filter arrays (get them from the Internet) and implement an algorithm that simulates image formation using your selected Bayer CFA. Remember that you get a grayscale image.

      Implement an appropriate demosaicking algorithm to restore a full colour image from the grayscale Bayer CFA image. Measure the difference between the original image and the demosaicked image by subtracting one from the other and taking the absolute values. Remember that an image is like a matrix and we know how to subtract matrices, don't we?! What is the mean error per pixel? Compute it as the sum of the errors / number of pixels in the image.

      You can use the same images as for the above problems.

    There are a few more images here for you to play with:
    end of assignment ii

  Assignment - I (Due Date: 25/02/2026)
  1. This assignment consists of three questions for 20 Marks. Answer all of them.
  2. The marks are given alongside the questions.
  3. You may use any source on the Internet but should give the reference in your assignment.
  4. If you use any AI Tool, make sure you include, in the assignment, the prompt given by you. However, remember that you are being very bad to the environment! You can power 100 high-end apartments in Hyderabad for a month with the power AI tools consume in one hour.
Submit your assignments in a PDF via email to
chakravarthybhagvati@uohyd.ac.in
by the due date, 25 February 2026, 9:00 PM.

Questions
  1. (8 Marks) Use the book, Digital Image Processing, to find the equations for converting RGB to L*a*b* space and vice-versa. Write a Python module or C functions on your own to implement the conversions. Hint: You may want to use the openCV library in both Python and C languages.
    Use your code to find the pair-wise distances between the colours: C1 = (64, 192, 96), C2 = (168, 255, 128) and C3 = (64, 66, 96) in RGB and L*a*b* spaces. Which distances appear to match your perception of the three colours?
  2. (4 Marks) Consider the colour C = (0, 32, 128). Convert it into Chsv using Python colorsys/openCV libraries. Multiply the intensity value by 1.5 and then convert the colour back into RGB space. Multiply the original C in RGB space by 1.5. In other words, multiply each component by 1.5. Are the two colours the same? Explain your answers.
  3. (8 Marks) Download the Colour Matching Matrix in csv format. This contains the CIE colour matching functions from 400 nm to 700 nm in 5 nm intervals (i.e. 61 rows and 3 columns).
    Using the data, write programs for two functions: to create a spectrum as follows
    create_gauss_spectrum(center, bandwidth, energy)
    The parameter center is the wavelength, expressed in nanometres between 400 and 700nm, bandwidth is the width of the spectrum and energy is the total area under the spectrum. The spectrum is a gaussian function centred at the wavelength with its standard deviation given by the bandwidth divided by 6. The gaussian function is defined as $$\mbox{gauss}(x, m, w, A) = \frac{A}{\sqrt{2\pi}w}e^{-\frac{(x-m)^2}{2w^2}}~~~ \mbox{(Corrected,}~`-'~\mbox{missing in exponent earlier)}$$ In this equation, \(m = \mbox{center}, w = \frac{\mbox{bandwidth}}{6}, A = \mbox{energy}\).
    Important: Remember to write the function such that the spectrum is also in steps of 5 nm from 400 nm to 700 nm.
    The second function is to convert a spectrum into a colour
    spect2rgb(spect)
    where spect is the input spectrum and the return value from the function is an RGB triplet. If you are using a C program, use extra parameter(s) to get the return value as it is not easy to return an array.
    You also need the XYZ to RGB conversion matrix (3x3). Download or copy the XYZ to sRGB matrix for D65 illuminants from any source on the WWW.
    Use your functions to create three gaussian spectra with different sets of parameters and convert them into RGB colours. Are the colours what you expect? Explain briefly.

end of assignment i

   
  Minor - I (Syllabus) (Date: 12/03/2026)

Chapter 6: Colour Image Processing
Sections covered

  • Basics of Full Color Image Processing
  • Color Transformations
  • Color Image Smoothing and Sharpening

Link for Vector Image Processing (also available as Item IV in the Syllabus section).
Also, Material from class

Minor-I Answers


 

Reference Materials


Colour Image Processing Slides

Physics of Colour

The Human Vision System

Colour Spaces

Scalar Processing

  • Look at the book by Gonzalez and Woods given above and refer to the relevant portions in Chapter 6, Sections 4, 5 and 6.
  • Scalar Image Processing (a slightly incomplete reference!)

Vector Image Processing

Colour Half-toning: Dithering and Error Diffusion

Colour Quantisation

Contact.


Coming Soon ...

Powered by w3.css