Software Programs and Projects

This Software Programs and Projects include programing tips and technology using different languages like VC++,ASP,JSP C#.Net,PHP,VB.Net,JavaScript,ASP.NET .Software Programs and Projects blog mainly support to software programmers and provide help through the mail.

iPhone Application Tutorial

Delegation is a pattern where one object periodically sends messages to another object specified as its delegate to ask for input or to notify the delegate that an event is occurring. You use it as an alternative to class inheritance for extending the functionality of reusable objects. In this application, the application object tells its delegate that the main start-up routines have finished and that the custom configuration can begin. For this application, you want the delegate to create an instance of a controller to set up and manage the view. In addition, the text field will tell its delegate (which in this case will be the same controller) when the user has tapped Return.


Model-View-Controller
The Model-View-Controller (or “MVC”) design pattern sets out three roles for objects in an application.
Model objects represent data such as SpaceShips and Rockets in a game, ToDo items and Contacts in a productivity application, or Circles and Squares in a drawing application. In this application, the data is going to be very simple—just a string—and it’’s not actually used outside of a single method, so strictly speaking it’’s not even necessary. It’’s the principle that’’s important here, though. In other applications the model will be more complicated and accessed from a variety of
locations.

View objects know how to display data and may allow the user to edit the data. In this application you need a main view to contain several other views—a text field to capture information from the user, a second text field to display text based on the user’’s input, and a button to let the user tell us that the secondary text should be updated.

Controller objects mediate between models and views. In this application, the controller object will take the data from the input text field, store it in a string, and update a second text field appropriately. The update will be initiated as a result of an action sent by the button.


Getting Started with iPhone Programming


Welcome to the world of iPhone programming! That you are now holding this book shows that you are fascinated with the idea of developing your iPhone applications and want to join the ranks of those tens of thousands of developers whose applications are already deployed in the AppStore.

As the old Chinese adage says, “To accomplish your mission, first sharpen your tools.” Successful programming requires you fi rst of all to know your tools well. Indeed, this couldn”t be more true for iPhone programming — you need to know quite a few tools before you can even get started. Hence, the goal of this chapter is to show you the various relevant tools and information you need to jump on the iPhone development bandwagon. Without further ado, it’’s time to get down to work.

Image Analysis and Processing Tutorial


Image analysis combines techniques that compute statistics and measurements based on the gray-level intensities of the image pixels. You can use the image analysis functions to determine whether the image quality is good enough for your inspection task. Also, you can analyze an image to understand its content and to decide which type of inspection tools to use to solve your application. Image analysis functions also provide measurements that you can use to perform basic inspection tasks such as presence or absence verification.

Common tools you can use for image analysis include histograms, line profiles, and intensity measurements.

Histogram

A histogram counts and graphs the total number of pixels at each grayscale level. Use the histogram to determine if the overall intensity in the image is suitable for your inspection task. From the histogram, you can tell whether the image contains distinct regions of a certain gray-level value. Based on the histogram data, you can adjust your image acquisition conditions to acquire higher quality images. You can detect two important criteria by looking at the histogram:

Underexposure or saturation–Too little light in the imaging environment leads to underexposure of the imaging sensor. Too much light causes overexposure, or saturation, of the imaging sensor. Images acquired with underexposed or saturated conditions do not contain all the information that you need to inspect your object. It is important to detect these imaging conditions and correct for them during the setup of your imaging system.



C# Solutions for a Face Detection and Recognition System



Key issues on using a new programming language - C# - in implementation of a face detection and recognition (FDR) system are presented. Mainly the following aspects are detailed: how to acquire an image, broadcast a video stream, manipulate a database, and finally, the detection/recognition phase, all in relation with theirs possible C#/.NET solutions. Emphasis was placed on artificial neural network (ANN) methods for face detection/recognition along with C# object oriented implementation proposal.

In June 2000, Microsoft announced both the .NET platform and a new programming language called C# [1-3]. .NET is a framework that covers all the layers of software development from the operating system up. It actually wraps the operating system, insulating software developed with .NET from most operating system specifics such as file handling and memory allocation. It provides a new application programming interface (API) to the services and APIs of classic Windows operating systems while bringing together a number of disparate technologies that emerged from Microsoft during the late 1990s. It provides the richest level of integration among presentation technologies, component technologies, and data technologies ever seen on a Microsoft platform. This includes COM+ component services, a commitment to XML and object-oriented design, support for new web services protocols such as SOAP, WSDL, and UDDI, etc. .NET framework components .

Image acquisition includes the first two stages depicted in Figure 3, namely image grabbing and preprocessing. Eventually, at this step, the video stream could be broadcasted, in real time, over Internet. Considering the coding difficulties, using C# together with a videocapture device (videocamera, webcam), grabbing a still image from the video stream and, eventually, Internet broadcast it via a web server, is nowdays the most problematic aspect of the C# FDR implementation. Most of the problems are promised to be solved in the near future by DirectX 10 /Windows Longhorn launching. It seems that there are only two ways to communicate with a videocapture device:

Considering an image representing a frame taken from a video stream or a graphic file selected from a database; the problem of face detection consist of finding the spatial location within the scene where human faces are located. This problem is quite challenging due numerous issues, e.g. pose, presence or absence of structural components, facial expression, occlusion, orientation, imaging conditions.

DirectX in C#

Several techniques of implementing DirectX functionality into C# application will be presented. Their common attribute is an idea of component object model (COM) because DirectX is based on component technology. This paper will be focused on use of DirectX graphical capabilities within the C# code of the Microsoft .NET Framework. Three main techniques will be described. First, COM interoperability which allows us to decide what specific functionality to use. There will be also mentioned some basic principles like memory management and garbage collector (GC) and some approaches based on wrapper classes. Second, Visual Basic type library that includes all the functionality, and third, the complete solution known as DirectX 9.0. Each technique will be supported with a code snippet and with several reasons stating its suitability. Nowadays, the need for security can be more important than for the efficiency. This also gives a right answer for the question of how good is solution provided by use of DirectX and .NET Framework.

The purpose of this paper is to provide a basic idea about implementation of DirectX graphical interface in the code of C# language in the .NET Framework. A goal is to have such an environment where the code for C# looks similar to the C++ one. This work is a part of project ROTOR, more detailed information is placed at [Her03]. DirectX version 8.1 and above is assumed, if not said explicitly. Complete information on DirectX and .NET Framework can be found in electronic resources [MSDN02].

The .NET Framework Environment where the C# code is executed. It uses Garbage Collector (GC) for system memory management, which automates such tasks as a memory allocation, release, fragmentation, etc. No pointers are allowed here (managed code) but if necessary, the unmanaged code can be entered. In this mode pointers are allowed but GC doesn”t work - it is a developer responsibility to manage the memory. Therefore the managed code should be used but there is a problem: DirectX is using pointer parameters to pass data into its functions. How to face this pointer-problem will be shown later in the paragraph “COM Benefits”.