CAMERAPhân tíchảnhNhận dạngThu nhận ảnhSố hoáHệ thốngThu nhận ảnhChương Một: NHẬP MÔN XỬ LÝ ẢNH NHẬP MÔN XỬ LÝ ẢNH INTRODUCTION TO DIGITAL IMAGE PROCESSING1.1 TỔNG QUAN VỀ MỘT HỆ THỐNG XỬ LÝ ẢNHXử lý ảnh là một khoa học còn tương đối mới mẻ so với nhiều ngành khoa học khác, nhất là trên qui mô công nghiệp, song trong xử lý ảnh đã bắt đầu xuất hiện những máy tính chuyên dụng. Để có thể hình dung cấu hình một hệ thống xử lý ảnh chuyên dụng hay một hệ thống xử lý ảnh dùng trong nghiên cứu, đào tạo, trước hết chúng ta sẽ xem xét các bước cần thiết trong xử lý ảnh.Trước hết là quá trình thu nhận ảnh. Ảnh có thể thu nhận qua camera. Thường ảnh thu nhận qua camera là tín hiệu tương tự (loại camera ống kiểu CCIR), nhưng cũng có thể là tín hiệu số hoá (loại CCD - Charge Coupled Device). Lưu trữ SENSOR Lưu trữ Hệ Q.Định Hình 1.1.a. Các giai đoạn chính trong xử lý ảnhẢnh cũng có thể thu nhận từ vệ tinh qua các bộ cảm ứng (sensor), hay ảnh, tranh được quét trên scanner. Chi tiết về quá trình thu nhận ảnh sẽ được mô tả trong chương 2. Tiếp theo là quá trình số hoá (Digitalizer) để biến đổi tín hiệu tương tự sang tín hiệu rời rạc (lấy mẫu) và số hoá bằng lượng hoá, trước khi chuyển sang giai đoạn xử lý, phân tích hay lưu trữ lại.Qúa trình phân tích ảnh thực chất bao gồm nhiều công đoạn nhỏ. Trước hết là công việc tăng cường ảnh để nâng cao chất lượng ảnh. Do những nguyên nhân khác nhau: có thể do chất lượng thiết bị thu nhận ảnh, do nguồn sáng hay do nhiễu, ảnh có thể bị suy biến. Do vậy cần phải tăng cường và khôi phục lại ảnh để làm nổi bật một số đặc tính chính của ảnh, hay làm cho ảnh gần giống nhất với trạng thái gốc- trạng thái trước khi ảnh bị biến dạng. Giai đoạn tiếp theo là phát hiện các đặc tính như biên, phân vùng ảnh, trích chọn các đặc tính, v.v .Nhập môn xử lý ảnh số - ĐHBK Hà nội 11 Chương Một: NHẬP MÔN XỬ LÝ ẢNH Cuối cùng, tuỳ theo mục đích của ứng dụng, sẽ là giai đoạn nhận dạng, phân lớp hay các quyết định khác. Các giai đoạn chính của quá trình xử lý ảnh có thể mô tả ở hình 1.1.a.Với các giai đoạn trên, một hệ thống xử lý ảnh (cấu trúc phần cứng theo chức năng) gồm các thành phần tối thiểu như hình 1.1.b. Đối với một hệ thống xử lý ảnh thu nhận qua camera-camera như là con mắt của hệ thống. Có 2 loại camera: camera ống loại CCIR và camera CCD. Loại camera ứng với chuẩn CCIR quét ảnh với tần số 1/25 và mỗi ảnh gồm 625 dòng. Loại CCD gồm các photo điốt và làm tương ứng một cường độ sáng tại một điểm ảnh ứng với một phần tử ảnh (pixel). Như vậy, ảnh là tập hợp các điểm ảnh. Số pixel tạo nên một ảnh gọi là độ phân giải (resolution). Bộ xử lý tương tự (analog processor). Bộ phận này thực hiện các chức năng sau:- Chọn camera thích hợp nếu hệ thống có nhiều camera.- Chọn màn hình hiển thị tín hiệu- Thu nhận tín hiệu video thu nhận bởi bộ số hoá(digitalizer). Thực hiện lấy mẫu và mã hoá.- Tiền xử lý Introduction to Perfect Competition Introduction to Perfect Competition By: OpenStaxCollege Depending upon the competition and prices offered, a wheat farmer may choose to grow a different crop (Credit: modification of work by Daniel X O'Neil/Flickr Creative Commons) A Dime a Dozen When you were younger did you babysit, deliver papers, or mow the lawn for money? If so, you faced stiff competition from a lot of other competitors who offered identical services There was nothing to stop others from offering their services too 1/2 Introduction to Perfect Competition All of you charged the “going rate.” If you tried to charge more, your customers would simply buy from someone else These conditions are very similar to the conditions agricultural growers face Growing a crop may be more difficult to start than a babysitting or lawn mowing service, but growers face the same fierce competition In the grand scale of world agriculture, farmers face competition from thousands of others because they sell an identical product After all, winter wheat is winter wheat But it is relatively easy for farmers to leave the marketplace for another crop In this case, they not sell the family farm, they switch crops Take the case of the upper Midwest region of the United States—for many generations the area was called “King Wheat.” According to the United States Department of Agriculture National Agricultural Statistics Service, statistics by state, in 1997, 11.6 million acres of wheat and 780,000 acres of corn were planted in North Dakota In the intervening 15 or so years has the mix of crops changed? Since it is relatively easy to switch crops, did farmers change what was planted as the relative crop prices changed? We will find out at chapter’s end In the meantime, let's consider the topic of this chapter—the perfectly competitive market This is a market in which entry and exit are relatively easy and competitors are “a dime a dozen.” Introduction to Perfect Competition In this chapter, you will learn about: • • • • Perfect Competition and Why It Matters How Perfectly Competitive Firms Make Output Decisions Entry and Exit Decisions in the Long Run Efficiency in Perfectly Competitive Markets All businesses face two realities: no one is required to buy their products, and even customers who might want those products may buy from other businesses instead Firms that operate in perfectly competitive markets face this reality In this chapter, you will learn how such firms make decisions about how much to produce, how much profit they make, whether to stay in business or not, and many others Industries differ from one another in terms of how many sellers there are in a specific market, how easy or difficult it is for a new firm to enter, and the type of products that are sold This is referred to as the market structure of the industry In this chapter, we focus on perfect competition However, in other chapters we will examine other industry types: Monopoly and Monopolistic Competition and Oligopoly 2/2 An introduction to disk drivemodelingChris Ruemmler and John WilkesHewlett-Packard Laboratories, Palo Alto, CAMuch research in I/O systems is based on disk drive simulation models, but howgood are they? An accurate simulation model should emphasize the performance-critical areas.This paper has been published in IEEE Computer 27(3):17–29, March 1994. Itsupersedes HP Labs technical reports HPL–93–68 rev 1 and HPL–OSR–93–29.Copyright © 1994 IEEE.Internal or personal use of this material is permitted. However, permission toreprint/republish this material for advertising or promotional purposes or forcreating new collective works for resale or redistribution must be obtained from theIEEE. To receive more information on obtaining permission, send a blank emailmessage to info.pub.permission@ieee.org.Note: this file was obtained by scanning and performing OCR on the IEEEpublished copy. As a result, it may contain typographic or other errors that are notin the published version. Minor clarifications and updates have been made to thebibliography. 1Modern microprocessor technology is advancing at an incredible rate, and speedups of 40 to 60 percentcompounded annually have become the norm. Although disk storage densities are also improvingimpressively (60 to 80 percent compounded annually), performance improvements have been occurring atonly about 7 to 10 percent compounded annually over the last decade. As a result, disk system performanceis fast becoming a dominant factor in overall system behavior.Naturally, researchers want to improve overall I/O performance, of which a large component is theperformance of the disk drive itself. This research often involves using analytical or simulation models tocompare alternative approaches, and the quality of these models determines the quality of the conclusions;indeed, the wrong modeling assumptions can lead to erroneous conclusions. Nevertheless, little work hasbeen done to develop or describe accurate disk drive models. This may explain the commonplace use ofsimple, relatively inaccurate models.We believe there is much room for improvement. This article demonstrates and describes a calibrated, high-quality disk drive model in which the overall error factor is 14 times smaller than that of a simple first-ordermodel. We describe the various disk drive performance components separately, then show how theirinclusion improves the simulation model. This enables an informed trade-off between effort and accuracy.In addition, we provide detailed characteristics for two disk drives, as well as a brief description of asimulation environment that uses the disk drive model.Characteristics of modern disk drivesTo model disk drives, we must understand how they behave. Thus, we begin with an overview of the currentstate of the art in nonremovable magnetic disk drives with embedded SCSI (Small Computer SystemsInterconnect) controllers, since these are widely available.Disk drives contain a mechanism and a controller. The mechanism is made up of the recording components(the rotating disks and the heads that access them) and the positioning components (an arm assembly thatmoves the heads into the correct position together with a track-following system that keeps it in place). Thedisk controller contains a microprocessor, some buffer memory, and an interface to the SCSI bus. Thecontroller manages the storage and retrieval of data to and from the mechanism and performs mappingsbetween incoming logical addresses and the physical disk sectors that store the information.Below, we look more closely at each of these elements, emphasizing features that need to be consideredwhen creating a disk drive model. It will become clear Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-WesleyChapter 6I/O Streams as an Introduction to Objects and Classes Slide 6- 3Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-WesleyOverview6.1 Streams and Basic File I/O 6.2 Tools for Stream I/O6.3 Character I/O6.4 Inheritance Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley6.1Streams and Basic File I/O Slide 6- 5Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-WesleyI/O StreamsI/O refers to program input and outputInput is delivered to your program via a stream objectInput can be fromThe keyboardA fileOutput is delivered to the output device via a streamobjectOutput can be to The screenA file Slide 6- 6Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-WesleyObjectsObjects are special variables thatHave their own special-purpose functionsSet C++ apart from earlier programming languages Slide 6- 7Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-WesleyStreams and Basic File I/OFiles for I/O are the same type of files used tostore programsA stream is a flow of data.Input stream: Data flows into the programIf input stream flows from keyboard, the program willaccept data from the keyboardIf input stream flows from a file, the program will acceptdata from the fileOutput stream: Data flows out of the programTo the screenTo a file Slide 6- 8Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesleycin And cout StreamscinInput stream connected to the keyboardcout Output stream connected to the screencin and cout defined in the iostream libraryUse include directive: #include <iostream>You can declare your own streams to use with files. Slide 6- 9Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-WesleyWhy Use Files?Files allow you to store data permanently!Data output to a file lasts after the program endsAn input file can be used over and overNo typing of data again and again for testingCreate a data file or read an output file at yourconvenienceFiles allow you to deal with larger data sets Slide 6- 10Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-WesleyFile I/OReading from a fileTaking input from a fileDone from beginning to the end (for now)No backing up to read something again (OK to start over)Just as done from the keyboardWriting to a fileSending output to a fileDone from beginning to end (for now)No backing up to write something again( OK to start over)Just as done to the screen [...]... only to the stream named in the call Slide 6- 3 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Overview 6.1 Streams and Basic File I/O 6.2 Tools for Stream I/O 6.3 Character I/O 6.4 Inheritance Slide 6- 45 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Manipulators A manipulator is a function called TEAM LinG INTRODUCTION TODIGITAL SIGNALPROCESSING ANDFILTER DESIGN INTRODUCTION TODIGITAL SIGNALPROCESSING ANDFILTER DESIGNB. A. ShenoiA JOHN WILEY & SONS, INC., PUBLICATION Copyright © 2006 by John Wiley & Sons, Inc. All rights reserved.Published by John Wiley & Sons, Inc., Hoboken, New Jersey.Published simultaneously in Canada.No part of this publication may be reproduced, stored in a retrieval system, or transmitted in anyform or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise,except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, withouteither the prior written permission of the Publisher, or authorization through payment of theappropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers,MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requeststo the Publisher for permission should be addressed to the Permissions Department, John Wiley &Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online athttp://www.wiley.com/go/permission.Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their bestefforts in preparing this book, they make no representations or warranties with respect to theaccuracy or completeness of the contents of this book and specifically disclaim any impliedwarranties of merchantability or fitness for a particular purpose. No warranty may be created orextended by sales representatives or written sales materials. The advice and strategies containedherein may not be suitable for your situation. You should consult with a professional whereappropriate. Neither the publisher nor author shall be liable for any loss of profit or any othercommercial damages, including but not limited to special, incidental, consequential, or otherdamages.For general information on our other products and services or for technical support, please contactour Customer Care Department within the United States at (800) 762-2974, outside the UnitedStates at (317) 572-3993 or fax (317) 572-4002.Wiley also publishes its books in a variety of electronic formats. Some content that appears in printmay not be available in electronic formats. For more information about Wiley products, visit ourweb site at www.wiley.com.Library of Congress Cataloging-in-Publication Data:ISBN-13 978-0-471-46482-2 (cloth)Printed in the United States of America.10987654321ISBN-100-471- 46482-1 (cloth) CONTENTSPreface xi1 Introduction 11.1 Introduction 11.2 Applications of DSP 11.3 Discrete-Time Signals 31.3.1 Modeling and Properties of Discrete-Time Signals 81.3.2 Unit Pulse Function 91.3.3 Constant Sequence 101.3.4 Unit Step Function 101.3.5 Real Exponential Function 121.3.6 Complex Exponential Function 121.3.7 Properties of cos(ω0n) 141.4 History of Filter Design 191.5 Analog and Digital Signal Processing 231.5.1 Operation of a Mobile Phone Network 251.6 Summary 28Problems 29References 302 Time-Domain Analysis and z Transform 322.1 A Linear, Time-Invariant System 322.1.1 Models of the Discrete-Time System 332.1.2 Recursive Algorithm 362.1.3 Convolution Sum 382.2 z Transform Theory 412.2.1 Definition 412.2.2 Zero Input and Zero State Response 49v viCONTENTS2.2.3 Linearity of the System 502.2.4 Time-Invariant System 502.3 Using z Transform to Solve Difference Equations 512.3.1 More Applications of z Transform 562.3.2 Natural Response and Forced Response 582.4 Solving Difference Equations Using the Classical Method 592.4.1 Transient Response and Steady-State Response 632.5 z Transform Method Revisited 642.6 Convolution Revisited 652.7 A Model from Other Models 702.7.1 Review of Model Generation 722.8 Stability 772.8.1 Jury–Marden Test 782.9 Solution Using MATLAB Functions 812.10 Summary 93Problems Chapter Perfect Competition INTRODUCTION TO ECONOMICS 2e / LIEBERMAN & HALL CHAPTER / PERFECT COMPETITION ©2005, South-Western/Thomson Learning Slides by John F Hall Animations by Anthony Zambelli Perfect Competition To determine structure of any particular market, we begin by asking How many buyers and sellers are there in the market? Is each seller offering a standardized product, more or less indistinguishable from that offered by other sellers • Or are there significant differences between the products of different firms? Are there any barriers to entry or exit, or can outsiders easily enter and leave this market? Answers to these questions help us to classify a market into one of four basic types Perfect competition Monopoly Monopolistic Oligopoly Lieberman & Hall; Introduction to Economics, 2005 The Three Requirements of Perfect Competition Large numbers of buyers and sellers, and Each buys or sells only a tiny fraction of the total quantity in the market Sellers offer a standardized product Sellers can easily enter into or exit from market Lieberman & Hall; Introduction to Economics, 2005 A Large Number of Buyers and Sellers In perfect competition, there must be many buyers and sellers How many? • Number must be so large that no individual decision maker can significantly affect price of the product by changing quantity it buys or sells Lieberman & Hall; Introduction to Economics, 2005 A Standardized Product Offered by Sellers Buyers not perceive significant differences between products of one seller and another For instance, buyers of wheat not prefer one farmer’s wheat over another Lieberman & Hall; Introduction to Economics, 2005 Easy Entry into and Exit from the Market Entry into a market is rarely free—a new seller must always incur some costs to set up shop, begin production, and establish contacts with customers But perfectly competitive market has no significant barriers to discourage new entrants • Any firm wishing to enter can business on the same terms as firms that are already there In many markets there are significant barriers to entry Legal barriers Existing sellers have an important advantage that new entrants can not duplicate • Brand loyalty enjoyed by existing producers would require a new entrant to wrest customers away from existing firms Significant economies of scale may give existing firms a cost advantage over new entrants Lieberman & Hall; Introduction to Economics, 2005 Easy Entry into and Exit from the Market Perfect competition is also characterized by easy exit A firm suffering a long-run loss must be able to sell off its plant and equipment and leave the industry for good, without obstacles Significant barriers to entry and exit can completely change the environment in which trading takes place Lieberman & Hall; Introduction to Economics, 2005 Is Perfect Competition Realistic? Assumptions market must satisfy to be perfectly competitive are rather restrictive In vast majority of markets, one or more of assumptions of perfect competition will, in a strict sense, be violated Yet when economists look at real-world markets, they use perfect competition more often than any other market structure Why is this? Model of perfect competition is powerful Many markets—while not strictly perfectly competitive—come reasonably close We can even—with some caution—use model to analyze markets that violate all three assumptions Perfect competition can approximate conditions and yield accurate-enough predictions in a wide variety of markets Lieberman & Hall; Introduction to Economics, 2005 Figure 1: The Competitive Industry and Firm The intersection of the market supply and the market demand curve… Price per Ounce Market The typical firm can sell all it wants at the market price… Price per Ounce S $400 $400 D Ounces of Gold per Day determine the equilibrium market price Lieberman & Hall; Introduction to Economics, 2005 Firm Demand Curve ... relatively easy and competitors are “a dime a dozen.” Introduction to Perfect Competition In this chapter, you will learn about: • • • • Perfect Competition and Why It Matters How Perfectly Competitive.. .Introduction to Perfect Competition All of you charged the “going rate.” If you tried to charge more, your customers would simply buy from someone else These conditions are very similar to. .. difficult it is for a new firm to enter, and the type of products that are sold This is referred to as the market structure of the industry In this chapter, we focus on perfect competition However, in