deepkaran singh(report)

44
INDUSTRIAL TRAINING REPORT AT DOORDARSHAN GURU TEGH BAHADUR INSTITUTE OF TECHNOLOGY G-8 AREA, RAJOURI GARDEN NEW DELHI -110064 SUBMITTED By:- Deepkaran Singh

Upload: kanwar123

Post on 29-Oct-2014

126 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Deepkaran Singh(Report)

INDUSTRIAL TRAINING REPORTAT

DOORDARSHAN

GURU TEGH BAHADUR INSTITUTE OF TECHNOLOGYG-8 AREA, RAJOURI GARDEN NEW DELHI -110064

SUBMITTED By:-

Deepkaran Singh ECE-1

01213202809

Page 2: Deepkaran Singh(Report)

ACKNOWLEDGEMENT

This report is an outcome of the practical training which I have gone through at PrasarBharti Broadcasting Corporation of India Doordarshan Kendra, DoordarshanBhawan, Phase-II Copernicus Marg Delhi - 110001. I would like to express deep sense of gratitude towards Mr. R.N. RAI, ASSISTANT ENGINEER, DDG (E) who permitted us to undergo this training. I would like to express my special thanks to Mr. RakeshChauhan, Dy. Director(Engg.)our Training Coordinator, who prepared our training schedule and for helping me in understanding the technical aspects of Broadcasting. It is a great pleasure to express my heart full thanks to the staff of Doordarshan who helped me directly or indirectly throughout the successful completion of my training

DEEPKARAN SINGH

PREFACE

Page 3: Deepkaran Singh(Report)

With the ongoing revolution in Electronics and Communication where innovations are taking place at the blink of eye, it is impossible to keep pace with the emerging trends. Excellence is an attitude that the whole of the human race is born with. It is the environment that makes sure that whether the result of this attitude is visible or otherwise. A well planned, properly executed and evaluated industrial training helps a lot in developing a professional attitude. It provides a linkage between a student and industry to develop an awareness of industrial approach to problem solving, based on a broad understanding of process and mode of operation of organization. During this period, the student gets the real experience for working in the industry environment. Most of the theoretical knowledge that has been gained during the course of their studies is put to test here. Apart from this the student gets an opportunity to learn the latest technology, which immensely helps in them in building their career. I had the opportunity to have a real experience on many ventures, which increased my sphere of knowledge to great extent. I got a chance to learn many new technologies and also interfaced many instruments. All this credit goes to the organization Prasar Bharti Doordarshan.

Page 4: Deepkaran Singh(Report)

DOORDARSHAN

Doordarshan (literally Far Vision) is the public television broadcaster of India and a division of PrasarBharti, a public service broadcaster nominated by the Government of India. It is one of the largest broadcasting organizations in the world in terms of the infrastructure of studios and transmitters. Recently, it has also started Digital Terrestrial Transmitters. On September 15, 2009, Doordarshan celebrated its 50th anniversary.

BeginningDoordarshan had a modest beginning with the experimental telecast starting in Delhi on 15 September 1959 with a small transmitter and a makeshift studio. The regular daily transmission started in 1965 as a part of All India Radio. The television service was extended to Bombay (now Mumbai) and Amritsar in 1972. Up until 1975, only seven Indian cities had a television service and Doordarshan remained the sole provider of television in India. Television services were separated from radio in 1976. Each office of All India Radio and Doordarshan were placed under the management of two separate Director Generals in New Delhi. Finally, in 1982, Doordarshan as a National Broadcaster came into existence.

Nationwide transmissionNational telecasts were introduced in 1982. In the same year, colour TV was introduced in the Indian market with the live telecast of the Independence Day speech by then Prime Minister Indira Gandhi on 15 August 1982, followed by the 1982 Asian Games which were held in Delhi. Now more than 90 percent of the Indian population can receive Doordarshan (DD National) programmed through a network of nearly 1,400 terrestrial transmitters. There are about 46 Doordarshan studios producing TV programs today.

Page 5: Deepkaran Singh(Report)

ChannelsPresently, Doordarshan operates 21 channels – two All India channels-DD National and DD News, 11 Regional languages Satellite Channels (RLSC), four State Networks (SN), an International channel, a Sports Channel DD Sports and two channels RajyaSabha TV &DD-LokSabhafor live broadcast of parliamentary proceedings. On DD National (DD-1), Regional programmed and Local Programmes are carried on time-sharing basis. DD News channel, launched on 3 November 2003, which replaced the DD Metro (DD-2) Entertainment channel provides 24-Hour news service. The Regional Languages Satellite channels have two components – The Regional service for the particular state relayed by all terrestrial transmitters in the state and additional programs in the Regional Language in prime time and non-prime time available only through cable operators. DD-Sports Channel is exclusively devoted to the broadcasting of sporting events of national and international importance. This is the only Sports Channels which telecasts rural sports like Kho-Kho, Kabbadi etc. something which private broadcasters will not attempt to telecast as it will not attract any revenues. At present three channels are broadcasted from the Delhi Doordarshan Kendra namely

DD National DD News DD Bharti

History of DoordarshanIn 1959, Philips (India) made an offer to the Government of a transmitter at a reduced cost. Earlier, Philips had demonstrated its use at an exhibition in New Delhi. The Government decided employing it on an experimental basis “to train personnel, and partly to discover what TV could achieve in community development and formal education”. A UNESCO grant of $20,000 for the purchase of community receivers and a United States offer of some equipment proved much too tempting to resist, and on September 15, 1959, the Delhi Television Centre went on air for half an hour, three days a week and inaugurated by Sh. Rajendra Prasad, President of India from VigyanBhawan.

The range of the transmitter was forty kilometers round and about Delhi. Soon programmes began to be beamed twice a week, each of 20 minutes’ duration. The audience comprised members of 180 ‘teleclubs’ which were provided sets free by UNESCO. The same organization concluded in a survey conducted two years later in 1961 that the ‘teleclub’ programmes had made ‘some impact’.

Entertainment and information programmes were introduced from August 1965, in addition to some social education programmes for which purpose alone TV had been introduced in the capital. The Federal Republic of Germany helped in setting up a TV production studio.

Page 6: Deepkaran Singh(Report)

By 1970, the duration of the service was increased to three hours, and included, besides news, information and entertainment programmes, two weekly programmes running to 20 minutes each for ‘teleclubs’, and another weekly programme of the same duration called ‘KrishiDarshan’ for farmers in 80 villages. ‘KrishiDarshan’ programmes began in January 1967 with the help of the Department of Atomic Energy, the Indian Agricultural Research Institute, the Delhi Administration and the State Governments of Haryana and Uttar Pradesh. The programmes could easily be picked up in these States, as the range of the transmitter was extended to 60 kilometers.

By the end of the decade there were more than 200,000 sets in Delhi and the neighbouring states. From January 1, 1976, ‘commercials’ came to be telecast at all the centres. Another significant development during the same year was the separation of TV from All India Radio.

And today, Doordarshan operates 30 channels in 22 languages and is one of the largest Terrestrial Network in the World.

List of Channels

National1. DD National

2. DD News

3. DD-RajyaSabha

4. DD-LokSabha

5. DD Sports

6. DD Bharti

Regional 1. DD Bangla 2. DD Kashmir 3. DD Urdu 4. DD Punjabi 5. DD NorthEast6. DD Sahyadri7. DD Gujarati 8. DD Malayalam 9. DD Podhigai10. DD Saptagiri11. DD Odia

Page 7: Deepkaran Singh(Report)

OB VANA mobile unit often referred to as a remote truck or outside broadcast (OB) van is a mobile television control room. Mobile units come equipped with a video switcher, intercom, graphics, audio, recorder / playback decks and all the engineering equipment required to maintain a quality signal. Remote trucks come in a variety of sizes and are equipped accordingly, many are not even trucks. Although they may be referred to as trucks, mobile units may be trailers, buses, 16m tractor-trailers, RVs, bread trucks or vans. The typical size of a large mobile unit is around 16m long by 2.6 m wide. However, in order to provide more space for the production crew, some trucks are expandable to 6m wide, utilizing a large shelf room that expands out of the main chassis.

Rear Cable Area Vision Area Production Area Audio Area

Inside a Mobile Unit / OB Van: The four primary areas of a mobile unit /OB van are production, audio, videotape and video control / transmission. Although layout and size of each of these areas differ from unit to unit, it is essential that each truck include these areas

Production Area: The production area is where the actual production decision is made and the show is created. This area includes the space for the director, producer, and their assistants: the technical director and the switcher: and sometimes the font coordinator, graphics operator and graphics equipment. One of the most significant parts of the production area is the monitor wall. The monitor wall includes the following:

Page 8: Deepkaran Singh(Report)

Preview monitor (an off-air monitor that allows the director and technical director to preview a videoimage before going to air)

Live or on-air monitor (shows images going on air or to tape)

Camera monitors (one for each camera)

VTR monitors

Graphics monitors

Still store monitors

Routed monitors Most walls are programmable so that any video device can be routed to any monitor giving directors the freedom to customize the wall to their own liking.

Audio Area: The audio area includes: Audio mixing board Patch panels Video and audio monitors Sources (such as CD player) Storage for microphones and patch cables The intercom is also patched in this area. The A-1 (Audio First Person) is usually the only person working in this area.

Page 9: Deepkaran Singh(Report)

Video tape Area: The video tape area includes: VTRs and their remote control units

Routing switchers to route various video signals to VTRs

Electronic still store (ESS) equipment used to capture, store, manipulate (if needed), and play back still images form video. The ESS can capture a still from any video source, such as camera, videotape or computer and store it on a hard drive. A large ESS system can store thousands of these still images, allowing instant retrieval.

Digital disc recorders (DDR), allows the operator to record and play back form the hard drive at the same time and provides instant playback ability via random access. In fact, some DDRs will record and play back two different sources at the same time.

Video Control Area: The video control area includes space for the video operators, camera control units, and test equipment. The goal for the video operators working here is to make sure that the cameras provide the highest quality image possible. Transmission equipment is sometimes included in this area as well.

Page 10: Deepkaran Singh(Report)

Communication Devices:

Communication at a remote producing is essential. Without it, directors cannot give directions to production personnel, and producers cannot communicate to the talent, graphics and tape operators. Without quality communication, a production will come to a grinding halt. The intercom is one of the most commonly used communication devices. Routed by the A-1, the intercom may have one to eight or more channels. Each channel is patched / routed only to those crew members who need to here that specific channel. Intercoms can be wired to each other, patched to telephone lines or can even be wireless.

An interruptible fold back (IFB) system is the type of intercom system used by production personnel to give directions to on-air talent. While talent may be hearing the program in their headsets, the producer can interrupt the program in order to give talent instructions in their headset.

Two way radios are essential wireless communication devices that are used by production support, engineering and field production units. These radios allow a person to move away from the more ―wired style of communication of the intercom yet remain accessible.

Outside a Mobile Unit / OB Van: The outside of the OB unit gives access to large storage areas that are used to transport cameras, tripods, and miscellaneous production gear. The storage space is also used to house the stairways and ladders that allow access to the various truck areas. The other primary area that is on the outside of the mobile unit is the inputs / outputs ( I/O ) panel. This panel is used to patch audio and video in and out of the truck. It generally has a variety of connector types and may even include phone patch blocks.

Page 11: Deepkaran Singh(Report)

The design concept of OB Vans has changed over the past few years Not long ago OB Vans were usually built for a particular production purpose such as sport news or shows and other cultural events. Today OB Vans are designed to cover all production requirements. They must however be flexible enough to adapt to the changing requirements from a technical and operational point of view No production unit can afford to keep a costly OB Van in the garage just because it cannot be used for a certain type of production.

As stated earlier, mobile units come in a variety of sizes. The size required will depend on the needs of the production. They are generally equipped for a specific purpose. A large mobile unit typically includes:

Video switcher (64 inputs with multiple mix / effect buses)

Digital video effects (DVE)

Still store

High level graphics generator

1-8 studio cameras

1-6 hand-held cameras (including pan heads, tripods, lenses)

6-8 VTRs

Slow-mo controllers

Disc recorder (DDR)

Audio console (roughly 120 inputs)

Dolby surround sound

A full inventory of microphones (shotgun, lavaliere, hand-held)

Sportscaster headsets and boxes

Multiple digicart players

CD player

Compression / limiters

12 channel intercom

12 channel IFB system

Multiple phone hybrids

Multiple line phone system

8-12 two – way radios

12-28 frame synchronizers 20-40 distribution converters

8-12 outboard monitors

Multiple four instrument light kits

Camera cable 6000 Triax, 4000 coax

Audio cable 3000 DT 1

Page 12: Deepkaran Singh(Report)

DSNG VAN (DIGITAL SATTELITE NEWS GATHERING)

Satellite news gathering (SNG) is the use of mobile communications equipment for the purpose of worldwide news casting. Mobile units are usually vans equipped with advanced, two-way audio and video transmitters and receivers, using dish antennas that can be aimed at geostationary satellites. During the 1990s, digital modulation supplanted analog modulation, giving rise to the newer technology of digital satellite news gathering (DSNG).A modern DSNG van is a sophisticated affair, capable of deployment practically anywhere in the civilized world. Signals are beamed between a geostationary satellite and the van, and between the satellite and a control room run by a broadcast station or network. In the most advanced systems, Internet Protocol (IP) is used. Broadcast engineers are currently working on designs for remotely controlled, robotic DSNG vehicles that can be tele-operated in hostile environments such as battle zones, deep space missions, and undersea explorations without endangering the lives of human operators.

Doordarshan studio setup:-

Page 13: Deepkaran Singh(Report)

Objectives:

To originate program from studios either for live telecast or for recording on a video tape.

To knit various other sources of programs available at the production desk - camera output from studios, feed from other Kendra, outdoor, playback from pre recorded tape, video graphics and characters generator etc.

Processing/distribution of different sources to various destinations in technical areas.

Routing of mixed program for recording/transmission via master switching room and microwave to the transmitter or any other desired destinations.

STUDIO CENTER:

Activities in a television studio can be divided into three major areas such as:1. Studio floor/ Action area2. Production control room3. Master control room/Central apparatus room4. Other facilities

Studio floor/Action area:

The studio floor is the actual stage on which the actions that will be recorded take place. A studio floor has the following characteristics and installations decoration:

Sets cameras on pedestals (pod)

Microphones

Lighting rigs and the associated controlling equipment

Video monitors for visual feedback from the production control room

Talkback system for communication

Page 14: Deepkaran Singh(Report)

Production control room:

Video monitor: monitors for program, preview, videotape machines, cameras, graphics and other video sources Video Switcher: a device where all video sources are controlled and taken to air. Also known as a special effects generator Audio mixing console and other audio equipment such as effects devices Character generator: creates the majority of the names and full screen graphics that are inserted into the program.

Page 15: Deepkaran Singh(Report)

Master control room:

The master control room houses equipment that is too noisy. It also makes sure that wire lengths and installation requirements are within manageable lengths. This can include:

Network Operations Center.

Transmission Control Room.

The actual circuitry and connection boxes of the vision mixer and character generator.

Central Apparatus Room.

Camera control units.

Page 16: Deepkaran Singh(Report)

TV TRANSMITTERS

The TV transmitters are broadly classified as:

a) High Power Transmitter (HPT): {power>1kW}TV transmitters having output power 1kW and above (1kW, 10kW, 20kW).

b) Low Power Transmitter (LPT): {50W<power<1kW}All TV transmitters having output power less than 1kW and more than or equal to 50W (50W, 100W, 300W, 500W).

c) Very Low Power Transmitter (VLPT): {power=10W}Output power of 10W.

EARTH STATION

The earth-based communication station provides a communication link to a communication satellite. The earth station itself is usually an antenna that includes a low-noise amplifier, a down-converter, as well as an electronics receiver. The antenna itself can vary in size from at little at 3 to 30 meters, depending on its usage May also be called a satellite earth station.

EARTH STATION divides one signal into 3 parts:

1) Pitampura TV tower – Local transmission/terrestrial2) Khelgaon –up linking for INSAT 3C3) Copernicus marg

Earth station is a main part which communicates with satellite which uplinks the signal to/from the satellite. Earth station is a purely digital.

In MSR [master switching room] whatever the signal it is in analog form is converted into digital version. Digital version of audio and video are standard form which is known as:

SDI - serial digital interface for videoAES -audio engineering society for audio

Page 17: Deepkaran Singh(Report)

Signal from MSR

In MSR whatever the signals are converted into digital form video in SDI andAudio in AES form. SDI and AES is embedded in MSR and converted into SDIEmbedded signal in which the audio is inserted in the video signalIn earth station all signals are in digital form which require high data rate. SoFor the up linking it required compression of the signals. Doordarshan uses 12Frame GOP. MPEG-2 format with sampling parameter of 4:2:0 with 10 bitQuantization and the bit rate is 4.5 Mbps for transmission over digitally modulationTechnique used is QPSK (quadrature phase shift keying). Earth station of theDoordarshan uplinks the digital signal of channel towards satellite and the peopleUsing DTH can directly receive signals from satellite. Many HPTs and LPTs spreadOver to cover the large guiarate for terrestrial transmission also uses downlink fromSatellite and after converting it to analog they transmits terrestrially.

Specifications of Doordarshan earth station

Up link frequency - 5974.5MHzDown link frequency - 3749.5 MHzSymbol rate - 6.25MBPSUplink polarization - horizontalDownlink polarization - verticalSatellite - insat-3A in geosynchronous orbitFEC - ¾Compression format - 4:2:2Coded standard - MPEG2

Page 18: Deepkaran Singh(Report)

MSR

It is the heart of the studio.Most of the switching electronics is kept e.g. camera base stations, switcher main frame, Satellite receivers, MW link, DDA & most of the patch panels. Signal is routed through MSR. Signal can be monitored at various stages

Page 19: Deepkaran Singh(Report)

Doordarshan ArchivesIt is a treasure house of many memorable performances of the great artistes who have contributed to India’s rich music and dance heritage. This is an endeavor to bring some of the exquisite performances of enduring beauty to reach out to a larger audience celebrating the spirit of a singing and dancing nation.

As modern India’s national channel, Doordarshan holds India’s master cache of archival material on her exquisite and arcane performing arts that survived independently of “formal documentation” as understood by the transcribing tradition of western societies.

Today, Doordarshan Channels: DD1 National, DD-Bharati, DD-News, DD-Sports, DD-India and eleven Regional Channels, substantially cover the Millennia-Old Heritage of the sub-continent of India.

Many genres in music, dance and theatre in India, now termed “classical”, flourish in today’s “contemporary” milieu in a fascinating flow of continuity and evolution for over 2,500 years.

Doordarshan celebrated the centenary of recording music in India (1902-2002) with its first set of 07 VCDs and ACDs in January2003 and a second set of 11 in June that year. The third set featuring the Bharat Ratna Awardees M.S.Subbulakshmi and Ustad Bismillah Khan were released in the year 2004. These series are now in their second edition. More will be available in 2005, the culled performance highs of the last quarter of a century.

Page 20: Deepkaran Singh(Report)

PROJECT: Pixel Correction

• Pixel (or pels) is used to denote the elements of a digital image. An image is

a 2D array of pixels with different intensity.

• Interpolation is to alter, invent or introduce by insertion a new matter.

Hence, the fundamental concept of Pixel Correction is to invent or predict missing

pixels.

Applications

• Image and Video Processing

• Digital Camera-Color interpolation Scheme (CCD image sensor)

• Printers

• Internet - Web Browsers

• Flat Panel Display (FPD) like LCD, Plasma..

• Medical science imaging.

• Videophone

Software Used: MATLAB 7.11

Page 21: Deepkaran Singh(Report)

Source Code

1.)Img_lab.mfunction varargout = img_lab(varargin)% IMG_LAB M-file for img_lab.fig% IMG_LAB, by itself, creates a new IMG_LAB or raises the existing% singleton*.%% H = IMG_LAB returns the handle to a new IMG_LAB or the handle to% the existing singleton*.%% IMG_LAB('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in IMG_LAB.M with the given input arguments.%% IMG_LAB('Property','Value',...) creates a new IMG_LAB or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before img_lab_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to img_lab_OpeningFcn via varargin.%% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one% instance to run (singleton)".%% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help img_lab

% Last Modified by GUIDE v2.5 15-Jul-2012 21:33:07

% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ...'gui_Singleton', gui_Singleton, ...'gui_OpeningFcn', @img_lab_OpeningFcn, ...'gui_OutputFcn', @img_lab_OutputFcn, ...'gui_LayoutFcn', [] , ...'gui_Callback', []);if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1});end

if nargout

Page 22: Deepkaran Singh(Report)

[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});else gui_mainfcn(gui_State, varargin{:});end% End initialization code - DO NOT EDIT

% --- Executes just before img_lab is made visible.function img_lab_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line arguments to img_lab (see VARARGIN)

% Choose default command line output for img_labhandles.output = hObject;set(handles.edit7,'string',datestr(now,0));htimer1 = timer('StartDelay',1,'TimerFcn',...'htimestr=findall(0,''tag'',''edit7'');set(htimestr,''string'',datestr(now,0));',...'Period',1,'ExecutionMode','fixedSpacing','tag','showtime');start(htimer1);% Update handles structureguidata(hObject, handles);

% UIWAIT makes img_lab wait for user response (see UIRESUME)% uiwait(handles.figure1);global img global im global choice im=0; img=''; choice=[1,1,1];

% --- Outputs from this function are returned to the command line.function varargout = img_lab_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structurevarargout{1} = handles.output;

function edit1_Callback(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1 as text

Page 23: Deepkaran Singh(Report)

% str2double(get(hObject,'String')) returns contents of edit1 as a double

% --- Executes during object creation, after setting all properties.function edit1_CreateFcn(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end

function edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit2 as text% str2double(get(hObject,'String')) returns contents of edit2 as a double

% --- Executes during object creation, after setting all properties.function edit2_CreateFcn(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end

% --- Executes on button press in pushbutton2.

% --- Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global choiceglobal im

Page 24: Deepkaran Singh(Report)

global img%Controllo se è stata scelta un'immagine sulla quale poter operareif(isempty(img)) disp(['image file not specified!']);else%Decido se richiamare la funzione che mostra una singola componente RGB%oppure la funzione che mostra l'immagine in bianco e neroif choice(1)==4 rgb2yuv(handles.axes1,im);else show_rgb(handles.axes1,im,choice(1));endend% --- Executes on button press in pushbutton3.function pushbutton3_Callback(hObject, eventdata, handles)% hObject handle to pushbutton3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global imgimg_temp=get(handles.edit2,'String');global im

if(isempty(img_temp)) disp(['image file not specified!']);elseim=imread(img_temp); %Leggo l'immagine da discoimg=img_temp; %Se l'immagine non esiste, img non viene settataaxes(handles.axes1) %Fisso l'axes sul quale plottareimshow(im); %Mostro l'immagineset(handles.axes1,'Visible','On') %La rendo visibileaxis(handles.axes1,'off') %Elimino gli assiend

% --- Executes on button press in radiobutton2.function radiobutton2_Callback(hObject, eventdata, handles)% hObject handle to radiobutton2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global choicechoice(1)=2;% Hint: get(hObject,'Value') returns toggle state of radiobutton2

% --- Executes on button press in radiobutton1.function radiobutton1_Callback(hObject, eventdata, handles)% hObject handle to radiobutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global choicechoice(1)=1;% Hint: get(hObject,'Value') returns toggle state of radiobutton1

Page 25: Deepkaran Singh(Report)

% --- Executes on button press in radiobutton3.function radiobutton3_Callback(hObject, eventdata, handles)% hObject handle to radiobutton3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global choicechoice(1)=3;% Hint: get(hObject,'Value') returns toggle state of radiobutton3

% --- Executes on button press in radiobutton4.function radiobutton4_Callback(hObject, eventdata, handles)% hObject handle to radiobutton4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global choicechoice(1)=4;% Hint: get(hObject,'Value') returns toggle state of radiobutton4

% --- Executes on button press in radiobutton5.function radiobutton5_Callback(hObject, eventdata, handles)% hObject handle to radiobutton5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global choicechoice(2)=1;% Hint: get(hObject,'Value') returns toggle state of radiobutton5

% --- Executes on button press in radiobutton6.function radiobutton6_Callback(hObject, eventdata, handles)% hObject handle to radiobutton6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global choicechoice(2)=2;% Hint: get(hObject,'Value') returns toggle state of radiobutton6

% --- Executes on button press in pushbutton4.function pushbutton4_Callback(hObject, eventdata, handles)% hObject handle to pushbutton4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global imgglobal imglobal choiceif(isempty(img)) disp(['image file not specified!']);else set_level(1,choice(3),im)end

% --- Executes on button press in pushbutton5.

Page 26: Deepkaran Singh(Report)

function pushbutton5_Callback(hObject, eventdata, handles)% hObject handle to pushbutton5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global imgglobal imglobal choiceif(isempty(img)) disp(['image file not specified!']);else

set_level(2,choice(3),im);end

% --- Executes on button press in radiobutton7.function radiobutton7_Callback(hObject, eventdata, handles)% hObject handle to radiobutton7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global choicechoice(3)=1;% Hint: get(hObject,'Value') returns toggle state of radiobutton7

% --- Executes on button press in radiobutton8.function radiobutton8_Callback(hObject, eventdata, handles)% hObject handle to radiobutton8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

global choicechoice(3)=2;% Hint: get(hObject,'Value') returns toggle state of radiobutton8

% --- Executes on button press in radiobutton9.function radiobutton9_Callback(hObject, eventdata, handles)% hObject handle to radiobutton9 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

global choicechoice(3)=3;% Hint: get(hObject,'Value') returns toggle state of radiobutton9

% --- Executes on button press in radiobutton10.function radiobutton10_Callback(hObject, eventdata, handles)% hObject handle to radiobutton10 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

global choice

Page 27: Deepkaran Singh(Report)

choice(3)=4;% Hint: get(hObject,'Value') returns toggle state of radiobutton10

% --- Executes on button press in radiobutton11.function radiobutton11_Callback(hObject, eventdata, handles)% hObject handle to radiobutton11 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

global choicechoice(3)=5;% Hint: get(hObject,'Value') returns toggle state of radiobutton11

% --- Executes on button press in pushbutton7.function pushbutton7_Callback(hObject, eventdata, handles)% hObject handle to pushbutton7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global imgglobal imif(isempty(img)) disp(['image file not specified!']);elseb=iir(im,str2num(get(handles.edit4,'String')));end

function edit4_Callback(hObject, eventdata, handles)% hObject handle to edit4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit4 as text% str2double(get(hObject,'String')) returns contents of edit4 as a double

% --- Executes during object creation, after setting all properties.function edit4_CreateFcn(hObject, eventdata, handles)% hObject handle to edit4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end

Page 28: Deepkaran Singh(Report)

% --- Executes on button press in pushbutton8.function pushbutton8_Callback(hObject, eventdata, handles)% hObject handle to pushbutton8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global imgglobal imif(isempty(img)) disp(['image file not specified!']);else adim=rgb2gray(im); adi=imadjust(adim); figure subplot(1,2,1); imshow(adim), title('original'); subplot(1,2,2); imshow(adi), title('adjusted image');

end

% --- Executes on button press in pushbutton9.function pushbutton9_Callback(hObject, eventdata, handles)% hObject handle to pushbutton9 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global imgglobal imif(isempty(img)) disp(['image file not specified!']);else figure subplot(1,2,1); imshow(im); title('original'); subplot(1,2,2); imhist(rgb2gray(im)); title('histogram');end

% --- Executes on button press in pushbutton10.function pushbutton10_Callback(hObject, eventdata, handles)% hObject handle to pushbutton10 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global imglobal choiceglobal imgif(isempty(img)) disp(['image file not specified!']);else

Page 29: Deepkaran Singh(Report)

equalizza(im,choice(2),str2num(get(handles.edit6,'String')));end

function edit6_Callback(hObject, eventdata, handles)% hObject handle to edit6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit6 as text% str2double(get(hObject,'String')) returns contents of edit6 as a double

% --- Executes during object creation, after setting all properties.function edit6_CreateFcn(hObject, eventdata, handles)% hObject handle to edit6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end

function edit7_Callback(hObject, eventdata, handles)% hObject handle to edit7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit7 as text% str2double(get(hObject,'String')) returns contents of edit7 as a double

% --- Executes during object creation, after setting all properties.function edit7_CreateFcn(hObject, eventdata, handles)% hObject handle to edit7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end

img_lab.fig

Page 30: Deepkaran Singh(Report)

2.)rgb2yuv.mfunction rgb2yuv(h,img)% This function performs a transformation of bases to obtain a% b/w image from an RGB image. Takes as input 2 parameters, the% first represents the handler of axes on which to show the result. The% second represents the image to transform.

% Perform the transformationimg_r(:,:,1)=.299.*img(:,:,1)+.587.*img(:,:,2)+.114.*img(:,:,3);% Fixed the handleraxes(h)% Show resultimshow(img_r);

end

3.)show_rgb.mfunction show_rgb(h,img,color)% This function shows a single component of an RGB image% plottandola on axes indicated by the handler passed as the first parameter.% The second parameter is the image on which to operate while the third parameter% has the following meanings:%%color=1 ==> red%color=2 ==> green%color=3 ==> blue

cntrl=0; %control variable

switch colorcase 1, %component deleted GB img_r(:,:,1)=img(:,:,1); img_r(:,:,2)=img(:,:,2).*0; img_r(:,:,3)=img(:,:,3).*0;case 2, %component deleted RB img_r(:,:,2)=img(:,:,2); img_r(:,:,1)=img(:,:,1).*0; img_r(:,:,3)=img(:,:,3).*0;case 3, %component deleted RG img_r(:,:,3)=img(:,:,3); img_r(:,:,1)=img(:,:,1).*0; img_r(:,:,2)=img(:,:,2).*0;otherwise disp(['Error: Choose a component from 1 to 3']) cntrl=1;end

if cntrl==0,

Page 31: Deepkaran Singh(Report)

axes(h) %Fisso l'axes imshow(img_r); %Mostro la componenteend

end

4.)equalizza.mfunction equalizza(im,scelta,m)% This function carries out Equalization of an rgb image or b/n% According to the value of the parameter "choice" that may be% 1 or 2 respectively.% The first parameter represents the image to equalize and the third% parameter is the exponent of the function of equalization.

if scelta==1

rgb={'Red','Green','Blue'}; % Define a record 3 strings for titlesfigure subplot(2,4,1) imshow(im) %plot original imagetitle('Original')

for k=1:3 % For each component of the RGB image: T=0; img=im(:,:,k); % Except the single component h=hist(img(:),0:255); % Store the frequencies of each color level% I histogram graph: subplot(2,4,k+1) %Select the subplot hist(img(:),0:255) %Trace the histogram title(rgb(k));

T=cumsum(h.^m); %Calculate equalization funtion T=T.*(256/max(T)); im(:,:,k)=T(im(:,:,k)+1); % Except what I've gotten in imendim=round(im); % Round the new levels achieved

subplot(2,4,5) %Select the subplotimshow(im) %Monster equalized imagetitle('Equalized')for k=1:3 % For each image component: equalized img=im(:,:,k); subplot(2,4,k+5) %Select the subplot hist(img(:),0:255) %Trace the histogram title(rgb(k)); end

elseif scelta==2 %for grayscale

im=.299.*im(:,:,1)+.587.*im(:,:,2)+.114.*im(:,:,3); % Convert the image to black and white

Page 32: Deepkaran Singh(Report)

figure subplot(2,2,1) imshow(im) title('Original')

h=hist(im(:),0:255);

subplot(2,2,2) hist(im(:),0:255); title('grayscale levels');

%equalization function calculation T=cumsum(h.^m); T=T.*(256/max(T)); im=T(im+1); im=round(im);

subplot(2,2,3) %Select the subplot imshow(im,[]) %Monster equalized image title('Equalizzed')

subplot(2,2,4) %Select the subplot hist(im(:),0:255); %Trace histogram title('grayscale levels');endend

5.)iir.mfunction I2= iir(im,f,varargin)%IIR Increases the resolution of an image by interpolation% B= IIR(inputfile,f) returns the image stored in file 'inputfile' with % resolution increased by factor f in both dimensions. 'filename' must be a % valid graphic file (jpg, gif, tiff, etc.). It can be grayscale or color. % Parameter 'f' is the size increase ratio, so to increase by 50% % use f= 1.5, to double size (in each dimension) use f= 2.%% Additional parameters:% B= IIR(A,f,'Display','off') eliminates display of both images, the original % and the modified. Deafult 'on'%% B= IIR(A,f,'Method',method) Allows to choose between five methods of % interpolation: linear, spline, pchip, cubic or v5cubic. 'method' must % be a string character. Default 'linear'%% Example:% B= iir('myimage.jpg',2,'Method','cubic');

% Defaultsmethod= 'linear';displ= 'on';

Page 33: Deepkaran Singh(Report)

f= max(f,1);npass= 1;

% Extract optional argumentsfor j= 1:2:length(varargin)switch varargin{j}case'method' method= varargin{j+1};case'display' displ= varargin{j+1};otherwise error('Unknown parameter name');endend

% Read image fileI= im;

% -------------------------------------------% Do the math % Sizes and new image arraynrow= ceil(size(I,1)+ size(I,1)*(f-1)/npass);ncol= ceil(size(I,2)+ size(I,2)*(f-1)/npass);I2= uint8(zeros(nrow,ncol,size(I,3)));

% Loop through rows & colsfor j= 1:size(I,1)for c= 1:size(I,3) I2(j,:,c)= expand(double(I(j,:,c)),ncol,method); endendfor j= 1:size(I2,2)for c= 1:size(I,3) I2(:,j,c)= expand(double(I2(1:size(I,1),j,c)),nrow,method);endend

% Plot final imagesif strcmp(displ,'on')if size(I,3) == 1 figure subplot(1,2,1); imagesc(I); colormap(gray); axis image, axis off title('original'); subplot(1,2,2); imagesc(I2);colormap(gray); axis image, axis off title('pixel correction');else figure subplot(1,2,1); image(I); axis image, axis off title('original'); subplot(1,2,2); image(I2);axis image, axis off

Page 34: Deepkaran Singh(Report)

title('pixel corrected');endend

% ##################################################% Support function% ##################################################

function yy= expand(y,ndot,method)

x = 1:length(y);xx = linspace(1,length(y),ndot);switch methodcase'linear' yy = uint8(interp1(y,xx,'linear'));case'spline' yy = uint8(interp1(y,xx,'spline'));case'pchip' yy = uint8(interp1(y,xx,'pchip'));case'cubic' yy = uint8(interp1(y,xx,'cubic'));case'v5cubic' yy = uint8(interp1(y,xx,'v5cubic'));end

6.)myadjust.mfunction [ adim] = myadjust( im )%UNTITLED Summary of this function goes here% Detailed explanation goes here adim=imadjust(im); figure subplot(1,2,1); imshow(im); title('original'); subplot(1,2,2); imshow(adim); title('adjusted image');

end

XXXXXXXXXXXXXXXXXX