Вы находитесь на странице: 1из 35

INDUSTRIAL TRAINING REPORT AT DOORDARSHAN

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

SUBMITTED By:Deepkaran Singh ECE-1 01213202809

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

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.

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.

Beginning
Doordarshan 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 transmission
National 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.

Channels
Presently, 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 &DDLokSabhafor live broadcast of parliamentary proceedings. On DD National (DD-1), Regional programmed and Local Programmes are carried on timesharing 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 Doordarshan
In 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.

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
National
1. 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 NorthEast 6. DD Sahyadri 7. DD Gujarati 8. DD Malayalam 9. DD Podhigai 10. DD Saptagiri 11. DD Odia

OB VAN
A 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:

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

Still store 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:

player) The intercom is also patched in this area. The A-1 (Audio First Person) is usually the only person working in this area.

Video tape Area:


The video tape area includes:

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. 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.

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.

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: multiple mix / effect buses)

-8 studio cameras -6 hand-held cameras (including pan heads, tripods, lenses) -8 VTRs -mo controllers udio console (roughly 120 inputs) -held) cart players player

Multiple line phone system -12 two way radios -28 frame synchronizers -40 distribution converters -12 outboard monitors ax, 4000 coax

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:-

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 area 2. Production control room 3. Master control room/Central apparatus room 4. 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

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.

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.

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/terrestrial 2) Khelgaon up linking for INSAT 3C 3) Copernicus marg

Earth station is a main part which communicates with satellite which up links 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 video AES -audio engineering society for audio

Signal from MSR


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

Specifications of Doordarshan earth station


Up link frequency - 5974.5MHz Down link frequency - 3749.5 MHz Symbol rate - 6.25MBPS Uplink polarization - horizontal Downlink polarization - vertical Satellite - insat-3A in geosynchronous orbit FEC - Compression format - 4:2:2 Coded standard - MPEG2

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

Doordarshan Archives
It is a treasure house of many memorable performances of the great artistes who have contributed to Indias 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 Indias national channel, Doordarshan holds Indias 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 todays 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.

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

Source Code 1.)Img_lab.m


function 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 EDIT gui_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 [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_lab handles.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 structure guidata(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 structure varargout{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 % 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 choice global im global img %Controllo se stata scelta un'immagine sulla quale poter operare if(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 nero if choice(1)==4 rgb2yuv(handles.axes1,im); else show_rgb(handles.axes1,im,choice(1)); end end % --- 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 img img_temp=get(handles.edit2,'String'); global im if(isempty(img_temp)) disp(['image file not specified!']); else im=imread(img_temp); %Leggo l'immagine da disco img=img_temp; %Se l'immagine non esiste, img non viene settata axes(handles.axes1) %Fisso l'axes sul quale plottare imshow(im); %Mostro l'immagine set(handles.axes1,'Visible','On') %La rendo visibile axis(handles.axes1,'off') %Elimino gli assi end

% --- 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 choice choice(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 choice choice(1)=1; % Hint: get(hObject,'Value') returns toggle state of radiobutton1

% --- 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 choice choice(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 choice choice(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 choice choice(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 choice choice(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 img global im global choice if(isempty(img)) disp(['image file not specified!']); else set_level(1,choice(3),im) end % --- Executes on button press in pushbutton5. 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 img

global im global choice if(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 choice choice(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 choice choice(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 choice choice(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 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 choice choice(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 img global im if(isempty(img)) disp(['image file not specified!']); else b=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

% --- 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 img global im if(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 img global im if(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 im global choice global img if(isempty(img)) disp(['image file not specified!']); else equalizza(im,choice(2),str2num(get(handles.edit6,'String'))); end

function edit6_Callback(hObject, eventdata, handles)

% hObject % eventdata % handles

handle to edit6 (see GCBO) reserved - to be defined in a future version of MATLAB 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

2.)rgb2yuv.m
function 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 transformation img_r(:,:,1)=.299.*img(:,:,1)+.587.*img(:,:,2)+.114.*img(:,:,3); % Fixed the handler axes(h) % Show result imshow(img_r); end

3.)show_rgb.m
function 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 color case 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, axes(h) imshow(img_r); end end

%Fisso l'axes %Mostro la componente

4.)equalizza.m
function 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'}; figure subplot(2,4,1) % Define a record 3 strings for titles

imshow(im) title('Original') for k=1:3 T=0; img=im(:,:,k); h=hist(img(:),0:255); % I histogram graph: subplot(2,4,k+1) hist(img(:),0:255) title(rgb(k)); T=cumsum(h.^m); T=T.*(256/max(T)); im(:,:,k)=T(im(:,:,k)+1); end im=round(im); subplot(2,4,5) imshow(im) title('Equalized') for k=1:3 img=im(:,:,k); subplot(2,4,k+5) hist(img(:),0:255) title(rgb(k)); end

%plot original image

% For each component of the RGB image: % Except the single component % Store the frequencies of each color level %Select the subplot %Trace the histogram

%Calculate equalization funtion % Except what I've gotten in im % Round the new levels achieved %Select the subplot %Monster equalized image % For each image component: equalized %Select the subplot %Trace the histogram

elseif scelta==2

%for grayscale

im=.299.*im(:,:,1)+.587.*im(:,:,2)+.114.*im(:,:,3); % Convert the image to black and white 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,[]) title('Equalizzed') subplot(2,2,4) hist(im(:),0:255); title('grayscale levels'); end end

%Monster equalized image

%Select the subplot %Trace histogram

5.)iir.m
function 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');

% Defaults method= 'linear'; displ= 'on'; f= max(f,1); npass= 1; % Extract optional arguments for 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'); end end % Read image file I= im; % ------------------------------------------% Do the math % Sizes and new image array

nrow= 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 & cols for j= 1:size(I,1) for c= 1:size(I,3) I2(j,:,c)= expand(double(I(j,:,c)),ncol,method); end end for 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); end end

% Plot final images if 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 title('pixel corrected'); end end

% ################################################## % Support function % ################################################## function yy= expand(y,ndot,method) x = 1:length(y); xx = linspace(1,length(y),ndot); switch method case'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.m
function [ 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

Вам также может понравиться