Saturday, November 13, 2010

All about CCTV Lenses

We already discuss about CCTV lenses so, we have the basic idea now we learning in details:

The human eye is an incredibly adaptable device that can focus on distant objects and immediately refocus on something close by. It can look into the distance or at a wide angle nearby. It can see in bright light or at dusk, adjusting automatically as it does so. It also has a long ‘depth of field’; therefore, scenes over a long distance can be in focus simultaneously. It sees colour when there is sufficient light, but switches to monochrome vision when there is not. It is also connected to a brain that has a faster updating and retentive memory than any computer. Therefore, the eyes can swivel from side to side and up and down, retaining a clear picture of what was scanned. The brain accepts all the data and makes an immediate decision to move to a particular image of interest, select the appropriate angle of view and refocus. The eye has another clever trick in that it can view a scene of great contrast and adjust only to the part of it that is of interest.

By contrast, the basic lens of a CCTV camera is an exceptionally crude device. It can only be focused on a single plane, everything before and after this plane becoming progressively out of focus. The angle of view is fixed. At any time, it can only view a specific area that must be predetermined. The iris opening is fixed for a particular scene and is only responsive to global changes in light levels. Even an automatic iris lens can be only be set for the overall light level, although there are compensations for different contrasts within a scene. Another problem is that a lens may be set to see into specific areas of interest when there is much contrast between these and the surrounding areas. However, as the sun and seasons change so do light areas become dark and dark areas become light. The important scene can be ‘whited out’ or too dark to be of any use.

A controversial but important aspect of designing a successful CCTV system is the correct selection of the lens. The problem is that the customer may have a totally different perspective of what a lens can see compared to the reality. This is because most people perceive what they want to view as they see it through their own eyes. Topics such as identification of miscreants or numberplates must be subjects debated frequently between installing companies and customers.

The selection of the most appropriate lens for each camera must frequently be a compromise between the absolute requirements of the user and the practical use of the system. It is just not possible to see the whole of a large loading bay and read all the vehicle number plates with one camera. The solution may be more cameras or viewing just a restricted area of particular interest. A Company putting forward the system proposal should have no hesitation in pointing out the restrictions that may be incurred according to the combination of lens versus the number of cameras. Better this than an unhappy customer who is reluctant to pay the invoice.

Although a lens is crude compared to the human eye, it incorporates a high degree of technology and development. There can be a large variation in the quality between different makes and this should be considered according to the needs of a particular installation. The lens is the first interface between the scene to be viewed and the eventual picture on the monitor. Therefore, the quality of the system will be very much affected by the choice of lens. For general surveillance of, for instance, a small retail shop, it is possible to use a lower quality lens with quite acceptable results. As the demands of the system requirement increase then the use of a premium quality lens must be considered. The difference in cost between a poor quality and a high quality lens will be a very small percentage of the total cost of a large industrial system.

The CCTV Lens Exposure Control
The exposure in a normal photographic camera can be controlled by a combination of shutter speed and iris opening. This is not so with a CCTV camera lens. A standard CCTV camera produces a complete picture every 1/2 of the mains frequency. This is every 1/25 second where the mains frequency is 50 Hz (cycles per second) and every 1/30 second where the mains frequency is 60 Hz. Generally the exposure time is fixed and the only control of the amount of light passing to the imaging device is by adjusting the size of the iris. This is covered in more detail later in this chapter. Most camera tubes and imaging devices have some tolerance of the amount of light passed by the lens to create an acceptable picture. The range of tolerance is generally inversely proportional to the sensitivity of the camera. The more sensitive cameras require greater control of the iris aperture.

Types of Lenses
Lens Formats
Diagram 1 Types of Lens Mounts
Early CCTV lenses were designed for the 1” format tube camera and many of these are still available on the market. The lens screw thread on these cameras is called a C-mount. This is a particular design of thread size and flange length originally used on photographic cameras. In recent years lenses have been developed for the 2/3”, 1/2” and now 1/3” format cameras. Consequently, great care must be exercised when selecting a lens for a particular camera. Just as there are four formats of camera so there are four formats of lenses and they are not compatible in every combination. A lens designed for a larger format camera may be used on a smaller format but not the reverse. In addition, the field of view will not be the same on different size cameras. There is now a further complication in that there is a range of lenses with what is called the CS-mount. The difference between the two types of mount is the flange back length, which is the distance from the back flange of the lens to the face of the sensor. See diagram 4.1. The screw thread and shoulder length for each type of mount is identical. This makes it impossible to see the difference except that the overall size of the CS-mount lens is generally smaller. A C-mount lens may be used on a CS-mount camera with an adapter ring but a CS-mount lens cannot be used on a C-mount camera. The main problem is that either type of lens can be screwed onto both types of camera without apparent damage. The result is that if the wrong type is used it will be impossible to focus the camera. Some C-Mount lenses have a projection at the back that could damage the sensor in a CS-Mount camera.
Below chart is provided at the end of this chapter showing the relationships between different lenses and camera combinations and the associated angle of view. At the time of going to press, most lenses with a focal length of 25mm and above are still designed for 1” cameras. This means that special care must be taken when using this long focal length lens on modern cameras. For instance, a 25mm 1” lens provides the following approximate angles of view on the different formats. Therefore, there would be a significant variation in the expected scene content if this fact were overlooked.
FORMAT 1" -- ANGLE OF VIEW 29°
FORMAT 2/3" -- ANGLE OF VIEW 9.5°
FORMAT 1/2" -- ANGLE OF VIEW 11.4°
FORMAT 1/3" -- ANGLE OF VIEW 9.79°


How to select a Lens
There are two other main factors that must be considered when selecting the most appropriate lens for a particular situation. The focal length and the type of iris control. Within each of these factors, there are other features that will also need to be considered. Lenses may be obtained with all combinations of focal length and iris control. The selection will depend on the site and system requirement.
Focal Length
The focal length of a lens determines the field of view at particular distances. This can either be calculated from the formula given later in this chapter or found from tables provided by most lens suppliers. Most manufacturers also provide simple to use slide or rotary calculators that computes the lens focal length from the scene size and the object distance. The longer the focal length the narrower is the angle of view. Although not strictly correct, lenses with a focal length longer than 25mm are often called zoom lenses. The focal length of the lens requires careful selection to ensure that the correct area is in view and that the degree of detail is acceptable. A rule of thumb is that to ‘see’ a person on a monitor they should represent at least 10% of the screen height. To ‘see’ in this context means to be able to decide that it is a person. For purposes of being able to identify a known person requires them to be at least 50% of the screen height and preferably 60%. An unknown person should occupy at least 120%of the screen height.
Fixed Focal Length
This type of lens is sometimes called a monofocal lens. As the name implies, it is specified when the precise field of view is fixed and will not need to be varied when using the system. The angle of view can be obtained from the supplier’s specification or charts provided. They are generally available in focal lengths from 3.7mm to 75mm. Longer focal lengths may be produced by adding a 2x adapter between the lens and the camera. It should be noted that this would increase the f-number by a factor of two (reducing the amount of light reaching the camera). If focal lengths longer than these are required, it will be necessary to use a zoom lens and set it accordingly.
Except for very wide-angle lenses, other lenses have a ring for adjusting the focus. In addition, cameras include a focusing adjustment that moves the imaging device mechanically relative to the lens position. This is to allow for minor variations in the back focal length of lenses and manufacturing tolerances in assembling the device in the camera. Correct focusing requires setting of both these adjustments. The procedure is to decide the plane of the scene on which the best focus is required and then set the lens focusing ring to the mid position. Then set the camera mechanical adjustment for maximum clarity. Final fine focusing can be carried out using the lens ring.
The mechanical focusing on cameras is often called the back focus, originally because a screw at the back of the camera moved the tube on a rack mechanism. Modern cameras now have many forms of mechanical adjustment. Some have screws on the side or the top, some still at the back. There are cameras that have a combined C/CS-mount on the front that also has the mechanical adjustment and can accept either type of lens format. The longer the focal length of the lens the more critical is the focusing. This is a function of depth of field described later in this chapter.
Manual Zoom Lens
A zoom lens is one in which the focal length can be varied manually over a range. Usually this is by means of a knurled ring on the lens body. It has the connotation of ‘zooming in’ and therefore infers a lens with a longer than normal focal length. (Say more than 25mm.) The zoom ratio is stated as being for instance 6:1, which means that the longest focal length is six times that of the shortest. The usual way of describing a zoom lens is by the format size, zoom ratio and the shortest and longest focal lengths. For example, 2/3”, 6:1, 12.5mm to 75mm. Again, great care must be taken in establishing both the camera and the lens format. The lens just described would have those focal lengths on a 2/3” camera but an equivalent range of 8mm to 48mm on a 1/2” camera.
Variable Focal Length
This is a design of lens that has a limited range of manual focal length adjustment. It is strictly not a zoom lens because it has quite a short focal length. They are usually used in internal situations where a more precise adjustment of the scene in view is required which may fall between two standard lenses. They are also useful where for a small extra cost one lens may be specified for all the cameras in a system. This saves much installation time and the cost of return visits to change lenses if the views are not quite right. For companies involved in many small to medium sized internal installations such as retail shops and offices this can save on stock holding. It makes the standardisation of systems and costing much easier.
Motorised Zoom Lens
Manual zoom lenses are not widely used in CCTV systems because the angle of tilt of the camera often needs to be changed as the lens is zoomed in and out. The most common need for a zoom lens is where used with a pan tilt unit. The lens zoom ring is driven by tiny DC motors and operated from a remote controller.
With the development of ever-smaller cameras and longer focal length lenses the method of mounting the camera/lens combination must be considered. There are many cases where the lens is considerably larger than the camera and it may be necessary to mount the lens rigidly with the camera supported by it. In other cases, it may be necessary to provide rigid supports for both camera and the lens. Always check the relationship between the camera and lens sizes and weights when selecting a housing or mounting. Most manufacturers of housings can provide lens supports as an accessory.
Focussing A Zoom Lens
The most frequent reason for the focus changing when zooming is that the mechanical focus of the camera has not been set correctly. The following is the procedure for setting up the focus on a camera fitted with a zoom lens.
The focusing ring should be marked ‘near’ and ‘far’. Set this to ‘far’ and set the zoom ring to the widest angle of view. Aim the camera at an object about 40 metres away and adjust the camera focus for maximum clarity. Next zoom in to an object nearby and set the lens focus for maximum clarity. It should now be possible to zoom all the way back without the focus changing. Many motorised zoom lenses will be used in external conditions with limited light. If this is the case then it is advisable to fit a neutral density filter in front of the lens to make the iris open fully. A neutral density filter is one that reduces the amount of light that enters the lens, evenly over the whole of the visible spectrum. This will create the shortest depth of field and ensure setting up more accurately for the worst conditions. The depth of field, as explained later, depends on the aperture opening.
Some controllers can override the automatic iris mechanism, usually to open it to see into darker areas. This is often the case when a camera is looking out over open country in bright sunlight and the lens closes because it measures the average light levels. The scene at ground level can be very dark in these conditions, with little detail. This is not a desirable feature to include unless absolutely necessary. This is because the override can be forgotten with resultant poor pictures being recorded if the system is not fully monitored. The better solution is to tilt the camera down until there is less proportion of sky in the picture.
Motorised Zoom Lenses With pre-sets
There are many situations where it is required to pan, tilt, and zoom to a predetermined position within the area being covered. It is possible to obtain motorised lenses with potentiometers fitted to the zoom and focusing mechanisms. These cause the lens to zoom automatically and focus to the setting by measuring the voltage across the potentiometer and comparing it with the signals in the control system. All other functions are as for motorised zoom lenses. Pre-set controls are only possible with telemetry controlled systems. The specification of the telemetry controls should be checked to see whether the pre-set positions are set from the central controller or locally from the telemetry receiver.

Iris Control of Lens
Manual Iris
With this type of lens, the iris opening is set manually by rotating a knurled ring on the lens body. Typically, it will have a range of settings from the maximum to fully closed, although the adjustment will be rather coarse. This type of lens is only suitable for indoor applications where the light levels remain fairly constant. It can also be used indoors with cameras having electronic shutters making a significant cost saving. Care must be exercised in using this camera/lens combination in external applications because the camera may not have adequate control to cover the total light range. In addition, manual iris lenses do not usually have a neutral density spot filter to cope with extremely bright sunlight.
In many indoor situations, the general level of light will vary significantly between summer and winter due to light from windows, skylights, etc. Therefore, it is often necessary to adjust the aperture two or three times a year to maintain optimum clarity of the picture.
Automatic Iris
Due to ongoing development, tubed cameras were becoming more sensitive and their use was spreading to more outdoor applications. They were very limited in the range of light that could be coped with. To overcome this problem manual iris lenses were fitted with motors bolted on to the barrel to drive the iris ring. The motors were connected by way of an amplifier to the video output of the camera. This was monitored to adjust the iris ring according to the voltage of the video signal. The lower the voltage then the more the iris would be opened until the correct video voltage was achieved, and the reverse when the video voltage increased. The early amplifiers suffered from the problem of being too sensitive and responding too quickly to changes in the video signal. This caused ‘hunting’ of the iris opening control and resulted in fluctuating contrast of the picture. To overcome this a delay circuit was introduced in the amplifier but this sometimes caused the reverse problem of the picture changing too slowly.
Modern automatic iris lenses are now completely self-contained units produced by the lens manufacturer and containing very sophisticated electronics and microscopic motors. There are three main types of automatic iris lenses.
Iris Amplifier
This type of lens is sometimes referred to as a servo lens. The most common type contains an amplifier and is connected to the video signal of the camera. It is driven by a dc voltage also provided from the camera. It was mentioned in Chapter 3, that the voltage of the video signal is proportional to the amount of light on the imaging device. The video level falls in proportion to the light level. The amplifier is continuously monitoring this voltage to maintain it at 1-volt peak to peak. As the voltage changes so the iris amplifier opens or closes the iris to maintain a constant 1-volt.
Most cameras that provide an automatic iris drive include a socket on the rear. There are three connections, +v, 0v, video. Unfortunately, there is no current standard for this connector but most cameras are packed with the appropriate plug. This can create problems if one camera is substituted for another make during maintenance or service. It can mean that the service engineer has to change the iris plug on site, which is not an easy job. In recognition of this problem, many cameras are now being produced with screw terminals on the rear.
Sensor Lens
This lens includes a light sensor similar to that in a photographic camera. This measures the light levels and adjusts the iris aperture accordingly. It requires a 12-volt dc supply that may be obtained from any source. This type of lens is not very common now having been introduced for use on Vidicon cameras that did not have a video and 12 volt output. The problem was that the light sensor was pre-set and not responsive to the video level, therefore the correct level was always maintained. The vast majority of cameras now provide an automatic lens connection therefore there will only be rare cases where this lens will be required.
Galvanometric Lens
These are also known as a galvometric or galvano lens. This type of automatic iris lens is driven by a reference voltage produced by an amplifier in the camera. In other words, the amplifier is within the camera instead of being part of the lens. The lens contains a driving motor to open and close the lens and a damping coil to prevent hunting. These lenses have four connections, +ve drive, -ve drive, +ve damping, and -ve damping. The camera specification should be checked to ensure that it contains the circuitry for this type of lens. Galvanometric lenses are usually less expensive than lenses with a built-in amplifier. They are simpler to install but can only be used with a limited range of cameras. Again, for this type of lens many cameras are being produced with screw connectors instead of a socket for the lens connection.

Lens Parameters
Focal Length
Diagram 2. Focal Length of Lenses
The rays from infinitely distant objects are condensed by the lens at a common point on the optical axis. The point where the image sensor of the camera is to be placed is called the focal point. A lens has two focal points, the primary principal point and the secondary principal point. The distance between the secondary principal point and the plane of the image sensor is the focal length of the lens.
Diagram 3. Angle of View
Angle of View of Lenses
This is the angle that the two lines from the secondary principal point make with the edges of the image sensor. The focal length of a lens is fixed whatever the size of the image sensor. The angle of view however varies according the size of the sensor.
The angle of view is given by the following formula:
Diagram 4 Angles of View for Different Sensor Sizes

Diagram 5 Focal Lengths for Different Sensor Sizes
The angle of view for a given focal length lens varies according to the sensor size. This is shown in diagram 4. The corollary of this is that for a given view the required focal length varies according to the sensor size as shown in diagram 4.6. This illustrates that for the same field of view, the smaller the format the shorter is the required focal length.
Field Of View
Diagram 6. Field Of View
The field of view is the ratio of the sensor size to the focal length and the distance to the subject. This is shown in diagram 4.7. The ‘width to height’ ratio of the sensor is 4:3. The horizontal and vertical angles and therefore fields of view are different and must be considered separately.

Sensor Sizes
Diagram 7. Sensor Dimensions


Diagram 7.shows the sensor sizes to be used when calculating fields of view and angles of view.For example, if it were required to view a subject 2.5 M high at a distance of 10M using a 2/3” camera and lens the calculation would be as below.
The nearest standard lens in this case would be a 25mm and the actual height of the subject scene would be 2.64 M. The slightly shorter focal length lens provides a slightly wider angle of view.
Most lens brochures give the horizontal and vertical angles of view. The relevant views can be calculated from the formula as follows:
Where: H is the height of the scene, d is the distance from the camera to the scene. This would give the vertical height of the scene using the vertical angle of view. Similarly, the horizontal width of the scene would be calculated from the horizontal angle of view.
Relationship Between Sensor Size and Lens Size
It can be very confusing to establish the actual field of view that will be obtained from a combination of sensor size and lens specification. Lenses are specified as designed for a particular sensor size. A lens designed for one sensor size may be used on a smaller size but not the reverse. The reason is that the extremities of the scene will be outside the area of the sensor. Many people in the CCTV industry have grown up with the 2/3” camera as the most popular and are familiar with the fields of view produced. However the 1/2” and 1/3” cameras are now being extensively used and therefore there are important factors that must be taken account.
Diagram 8. Effect of Sensor Size on View

Diagram 9. Using a Correctly Matched Camera and Lens Format
Diagram 8. shows the effect of using one lens on two different sizes of sensor. The result of using a larger lens format on a smaller lens format is to create the effect of a longer focal length, which is a narrower angle of view.
Diagram 9. shows the result of using a lens designed for a 1/2” format on a 1/2” sensor. This is an important consideration when deciding the most appropriate lens for a required field of view. The design size of the lens must be related to the size of the sensor being used.
To summarise then:
1. A lens designed for one format may be used on a smaller format camera but will produce a narrower angle of view.
2. A lens designed for one format may not be used on a larger format camera.
3. Assuming a focal length has been assessed based on a particular format of camera and lens, and it is then decided to use a smaller format camera, the same field of view will only be obtained if a shorter focal length lens is used.
4. Always check the angle of view for the particular lens and camera combination it is intended to use.
5. Charts at the end of this chapter provide guidance on the selection of lenses and the relationship between different formats of camera and lenses.

Aperture
The size of the aperture is called the ‘f number’ of the lens, e.g. f1.4, f1.2, etc. This is a mechanical ratio of the lens components and is specified as:
The effective diameter is related to the size of the front lens. Note that this is effective diameter and not the actual diameter. This is a measure of the amount of light that the lens will pass to the imaging device. As stated it is a ratio and does not refer to the quality of the lens. The smaller the number then the larger is the aperture. The figure given in specifications for lenses is the maximum aperture and this value is often followed by the minimum aperture. For instance, f1.4 -- f360, this second value being important if the camera is very sensitive such as an intensified sensor. Intensified cameras often require a minimum aperture as small as f1500. From the formula above it may be calculated that with a 16mm lens having the aperture set to f360 the effective diameter will be only 0.04mm. Even so, this could allow too much light to the sensor of an intensified camera and damage the tube or flare out the picture.

Having said that the f-number is a ratio, this does not imply that a lens with a lower number is better than one with a higher number. There are other factors that affect the light transmission through a lens. However, when comparing the major brands of lenses it is sufficient to use the f-number unless the application is especially demanding, where, for instance, image comparison or ultra fine resolution is necessary.

The efficiency of a lens and the amount of light it can transmit depend on many factors that lens designers must consider. However, ultimately a lens must be a commercial proposition and affordable to the CCTV installer and the customer. Two factors that affect the cost of a lens are the size of the glass elements and the number of elements. Therefore, it is less expensive to produce a 16mm f1.8 lens than it is to produce a 16mm f1.2. Consequently, some manufacturers produce the same focal length lens in two variations of f-number. For indoor conditions with ample light, or outdoor use in daylight only, the cheaper f 1.8 lens would be satisfactory and could represent a saving in cost. Exercise care in selecting the cheaper lens if the application is outdoors with low light conditions. As can be seen from this chapter, this would require nearly three times as much light as the f1.2 lens.

How aperture numbers are calculated
The scale of ‘f’ numbers, 1.4, 2.0, 2.8, 4, 5.6, etc. is such that successive numbers halve the amount of light passed to the sensor. These particular numbers are known as "full stops". This only applies to "full stops"; there are also half stops, which are numbers half way between full stops, and one-third stops In other words, the amount of light is proportional to the cross sectional area of the light rays entering the lens.
It can be shown that the f number,
From this equation the following can be derived;
If the illuminance is defined as ‘E’ lux, the equation can be shortened to;
If reflectance (R) is taken into account, this now becomes,
Another consideration is, how efficient is the lens at passing the maximum amount of light. There are several factors that determine the efficiency of a lens and of course they all cost money. When light passes through a glass/air boundary some is lost through reflection and refraction; this is reduced in the more expensive lenses. In addition, different light frequencies are refracted at different angles; special coatings are used to ensure that all frequencies are transmitted in parallel rays. The factor that measures the efficiency of a lens is known as the transparency ratio, (t) from which is calculated the transmission ratio (T).
The transparency ratio (t) is a function of the lens design and the number of glass elements. This is generally only available from the manufacturer. The transmission ratio (T) is the effective lens stop after adjusting for the transparency ratio (t) and is defined by
The resulting number will always be larger than the specified f-number.

For example, an f-1.4 lens having a transparency ratio (t) of 0.785 would have an effective aperture of f 1.58. This would be the value to use when calculating the light transmitted through a lens rather than the published f-number. All reputable manufacturers should be able to provide information on the transmission ratios for their lenses.
If this is now taken into account, the relationship becomes.
If an example is now worked using;
Transparancy ratio, t=0.785,
Reflectance, R=0.89,
Scene illumination, Escene=15 lux, Lens aperture, f=1.4,
Then, the light required on the sensor

The effect of sensor size
here is yet another factor that affects the efficiency of a camera/lens combination.

As stated in a previous article, light is energy measured in Watts per square Metre. Therefore, if the area of a sensor is known then the resultant power in watts can be calculated. The nominal areas of the sensors in common use are listed in table 2.
Table 2, areas of sensors

The power produced by each individual pixel in the sensor is directly proportional to its area. If three cameras are considered each with the same resolution of say 500 lines then the number of pixels on each sensor must be the same. The result of this is that the pixels on each smaller size of sensor must also be smaller. Therefore, the power produced will be less for the same aperture setting, i.e. the same amount of light energy. It is assumed that the light energy to produce a full 1-volt pp video signal is 5.0 mW/M2
If for the sake of an example, a light source of 1,000 milliwatts per square Metre is passed to the sensor via an f-1.8 aperture lens. The amount of light passed by the lens will be 7.5% = 75 mW/M2. From this, the power output can be calculated for each sensor. This will be the power multiplied by the area of the sensor. The result is shown in table 3.
Table 3-power output of sensors

Therefore the 1/2" and 2/3" sensors will be producing insufficient power for a full video signal. The answer is to use a lens with a larger aperture for these sensors so that more energy is passed to maintain the output power. This is summarised in table 4
Table 4-power output corrected by lens f-stop

This is the reason that many 1/3" cameras have the sensitivity specified with an f-1.0 or sometimes an f 0.9 aperture. Beware though, there are only a limited number of lenses made to the 1/3" format. If the longer focal length lenses must be used they usually have smaller apertures (higher f-numbers) and pass less light energy.
The contra to this argument is that if a sensor of one size has the same size pixels as a larger one, then the light required will be the same. However the total number of pixels will be fewer and the resulting resolution will be proportionally less. There is no such thing as a free lunch!

Thursday, November 4, 2010

Reset Your Lost BIOS Password Without Removing The CMOS Battery

Follow these steps:
·                     Restart your computer in MS-DOS mode.
·                     When you get to the C:\> or C:\WINDOWS> command prompt, type DEBUG and press Enter.
·                     A hyphen (-) prompt will appear waiting for you to enter commands.
·                     Enter the following commands, pressing Enter after each one. Note: the o is the letter o and stands for OUTPUT.
·                     o 70 2e 
·                     o 71 ff
·                     q
·                     After the q command (which stands for QUIT), enter Exit.

Then try to enter your BIOS at bootup. The password prompt should now be gone and you should now have full access to it again. However, you will now be at the default BIOS settings and may want to change them to your preference.

Wednesday, November 3, 2010

How to Reset / Recover / Change Forgotten Administrator Password in Windows?

Many times we face this problem when we or our friends forget Administrator account password in Windows and can't log into Windows. So here we are posting a few methods which can be used to change, reset or recover forgotten Windows password in Windows.

DISCLAIMER: Following information should be used only if its your system and you have forgotten account password. Don't use this information to access a system which is not yours without permission.

Method 1: Using Welcome or Login Screen
This method is the first thing which should always do whenever you forget your Windows login password. When we install Windows, it automatically creates a hidden user account"Administrator" and sets its password to blank. So if you forget your user account password then try this:

1. Start your computer and when you see Windows Welcome screen (Login screen), press <ctrl>+<alt>+<del> keys twice and it'll show Classic Login box.
2. Now type Administrator in Username box and leave Password box empty. Now press Enter and you should be able to log into Windows.
3. Now you can reset your account password from "Control Panel -> User Accounts".
Same thing can be done using Safe Mode. In Safe Mode Windows will show this in-built Administrator account in Login screen.
Method 2: Using Password Reset Disk
Windows XP and later Windows versions provide a built-in method to recover forgotten password by using "Password Reset Disk". If you created a Password Reset Disk in past, you can use that disk to reset the password.
If you don't know how to create a password reset disk, lets tell you in details. You can create the password reset disk using Control panel -> User Accounts applet.
First open Control Panel and click on User Accounts icon. It'll open User Accounts window. Now click on your user account and then click on "Prevent a forgotten password" link given in left-side pane. It'll open forgotten password wizard as shown in following screenshot:
Follow the instructions and you'll have a password reset disk in your hand.
Method 3: Using "Net User" DOS Command
You can also use a built-in DOS command "Net User" to change any desired user account password within seconds. You'll need access to Command Prompt window in this method:
1. Open Command Prompt as Administrator as mentioned here and run following command:
net user
2. It'll list all available user accounts in Windows.
3. Now run following command:
net user user_name new_password
Replace "user_name" with the desired user account name and replace "new_password" with your desired password.
For example:
net user "Arindam Bhadra" 12345
Here "Arindam Bhadra" is the user account name and 12345 is the new password.
4. That's it. It'll immediately change the user account password.
Method 4: Using Windows XP Setup Loophole
If the above mentioned tricks don't work for you, try following trick which is actually a loophole in Windows XP Setup and also a big security hole:
1. Boot using Windows XP Setup CD and follow the instruction like Accepting EULA, etc.
2. When it asks to repair your existing Windows installation, accept it and press "R" key to run the repair.
3. Setup will start repairing your Windows and will start copying files, etc.
4. After a few minutes setup will restart your system and when it restarts, don't press any key when it shows "Press any key to continue...". Otherwise Setup will start from the beginning. Don't press any key and setup will resume where it left.
5. Now it'll start doing other tasks and will show a small progressbar with a few details in left side.
6. Look carefully at the details and when it shows "Installing devices", press <Shift>+F10 keys together in your keyboard.
7. It'll open a Command Prompt window. Now type nusrmgr.cpl and press <Enter> key.
8. It'll open the same "User Accounts" window which you see in Control Panel.
9. Now you can remove or reset any account password without any problem.
Method 5: Using Bootable Rescue Disk
You can also use various bootable rescue CDs to reset your Windows password as mentioned in following link:
Method 6: Perform a Clean Installation of Windows
If all fails, simply reinstall Windows and create new user account. To recover lost data, you can use Data recovery tools available on net but the chances will be less to get your data back.
That's all we can suggest. If you know about any other method or tool, feel free to share it in your comment.....

Thursday, October 28, 2010

Double Router Forwarding process

As a CCTV Engineer / Technician its very hard to configure Double Router Forwarding for your Installed DVR. As a Technical Writer this post is dedicated to all who call / Mail for writing this Process. My aim is to keep this guide as simple as possible, while still providing you with the information you need to know.

As you can imagine, port forwarding through two routers is a bit more complex than port forwarding through one router. Below is a diagram of a double routed network.

Important Things to Notice:
· Both "Router #1" and "Router #2" have TWO IP addresses; an Internal IP address and an External IP address.

·    There are TWO LANs (Local Area Networks).

·    There are TWO WANs (Wide Area Networks). If there is a LAN then there is an accompanying WAN.
Now that we have identified these things we can go on to learn how they affect us.


Network Address Translation
For the sake of readability, from now on I will refer to "Router #1" and "Router #2" as "R1" and"R2" respectively.
Every router does NAT (Network Address Translation), and has both an internal IP address and an external IP address. The external IP address is the one that connects that router to the WAN (Wide Area Network). Usually the WAN is the Internet. The internal IP address connects the router to the internal network. Our network here is a bit more complex than the basic network.
R1's external IP address connects R1 to the Internet, just like any other network. R1 also has an internal IP address which provides NAT to the internal LAN1 network below it. The only thing connected to LAN1 is the router R2. R2 connects to LAN1 with an external IP address. Notice that R2's external IP address does not connect to the internet, but to another private network. Another way to say that is, R2's WAN IP address is external to R2 but internal to R1. R2 then provides NAT to the LAN2 network below it. R2 provides NAT through its internal IP address. The computers then connect to LAN2 and receive data from R2.
Let's assign IP addresses to everything, and see how it would look.

Notice that the IP addresses that exist on LAN1 differ from the IP addresses on LAN2. The IP addresses that are on LAN1 are 192.168.1.1 and 192.168.1.5. The IP addresses that are on LAN2 are 10.0.0.1 and 10.0.0.15. Here is another diagram to help show the network divisions:

Configure Port Forwards

Okay enough idle chatter. Let's talk about how to forward ports through this network.

Step 1

We want to forward ports from the WAN of R1 to a computer connected to LAN2. To do this we need to forward the ports in R1 to R2's external IP address. In this example we would log into R1 and forward ports to 192.168.1.5.
Note: In order to connect to R1's web interface one will probably have to plug a computer directly into R1 and establish a connection on LAN1.


Step 2

The next step is to forward ports from R2 to the proper network device whether it be a computer, XBOX, or PS3. (The Proper network device is the device on which you run the program for which you are forwarding ports.) In our example we would log into R2, and then forward ports to 10.0.0.15.
If you are having trouble forwarding ports or just don't want to deal with the hassle of doing it manually, check out PFConfig; a software tool that automatically forwards your ports.

Using the Free Router Detector you can know IP address for each host. Download Now & Install.


Static IP Addresses

You have now set up port forwards in your double router network and everything is working without a hitch. That's great, but if you have not configured static IP addresses for the network devices for which you have forwarded ports then your port forwarding settings are just waiting to break. When your port forward settings stop working, the most likely cause is that the network device for with you have forwarded ports has obtained a different internal IP address than the internal IP address that it had when you originally configured your port forward settings. The result is that your ports are no longer forwarded to the correct IP address.

How do I stop my port forward settings from breaking?
Static IP addresses allow you to assign an IP address to a network device and ensure that its IP address does not change.
The network devices for which ports are being forwarded need to have a static IP address. If a device does not have a static IP address, then it has a dynamic IP address. Dynamic IP addresses can/will change. As stated earlier, if the IP address of a network device for which ports you've forwarded ports changes, the ports will not be forwarded to the correct place. So it is important to setup a static IP address on the network devices for which you intend to forward ports.
The same applies to R2 in our example. R2's external IP address should really be static. This is not too big of a problem if R2 is the only network device connected to LAN1. If R2 is the only device on LAN1, it is unlikely that its IP address will change. If you have other devices on LAN1, you really need to setup a static IP address on R2. You would make configurations for a static IP address in the WAN section of R2.

Wednesday, October 13, 2010

Alternate Logon to Windows XP without Password

Logon to Windows XP with Secondary Logon without the need to enter a Password
Dear Readers, if you ever tried to enter a Windows XP system usually found on Schools, Cafe, Offices, Work Place etc. and were unable to logon because you didn't know the password for a specific account available in that system, then this trick may solve your problem... All you need to do is follow these instructions:

Press " ALT + CTRL + DEL " (Without Quotes) twice at the logon screen. (Make sure there is no account with name Administrator)
A Secondary Logon will popup.
In the User field, enter " Administrator " (Without Quotes) and Leave the password field blank/empty.
Press Enter. It should let you in. ( If not, there is possibility that the User had set an administrative password during Windows XP Installation).

Q: Want to know why & how this trick works ??
A: The simple answer to this question is that during an unattended Windows XP Installation or Installing Windows XP from MiniXP or Certain Modded Windows XP ISO Image* files, the Installation process skips the User Account Setup and directly asks the user to Create user account with up to 5 accounts options as you may have already noticed. This setups the secondary User Account with Administrative Privileges, while the Primary Administrator is set without or a blank password which when used with this trick, doesn't require you to enter any password...


*  Modded ISO Images are modified form of an Original ISO Image file, in such a manner to allow customization of Core OS that may or may not include features, programs, customization, personalization, extra drivers, apps, themes, registry hacks, explorer hacks etc etc.

Wednesday, October 6, 2010

How To Setup Two or More Routers Together

One of the most common issues people encounter is when they have more than one router hooked up. Sometimes people don't realize their modem is also a router (Such as DSL) and other times people hook up an extra router to use things their router/modem doesn't have, such as wireless.

So now with 2 or more routers hooked up people start to realize port forwarding & port triggering isn't working. This is because they are only setting up the port forwarding or triggering in one router, which is what they should be doing! Now let me explain, no one wants to setup port forwarding & triggering rules in two or more routers, they should only need to do it in one, making things simple. But you may ask "If I have more than one router how can I keep it simple?" The answer: DMZ

First off DMZ is supported by nearly every router/modem out there. What DMZ does is allow you to tell the router to forward all incoming connections to a single IP address. So in this case we will setup DMZ in the first router to point to the second router. Now all incoming connections are sent to the 2nd router and thus your port forwarding & triggering will work again.

So here is a quick example. I log into router 1 and go to the DMZ settings and put the WAN IP address of the 2nd router there. Now router 1 is out of the way for port forwarding and triggering as all incoming connections are now being forwarded to router 2. Now in router 2 I can setup my port forwarding & triggering rules just like normal.
So here is a quick step by step.
Step 1. Login into your Router
Step 2. Find the status page that shows the WAN/Internet IP address and write it down. (The Gateway IP will be the IP needed to log into the first router/modem.)
Step 3. Log into the first router/modem now.
Step 4. Find the DMZ page
Step 5. Enter the IP you wrote down into the DMZ page and enable DMZ.
Step 6. Save and you’re done.

Quick Tip: You should setup a static WAN IP address for router 2. If you leave it on DHCP the IP could change thus breaking the DMZ and of course breaking the port forwarding & triggering. This doesn't happen very often, but it is always a possibility.


If you want to Setup 3 routers at home. Here is my plan to setup. Please let me know if it make sense.
1.    SMC. It is a modern with router. It locates in the first floor, Rogers cable connected to this router. It is the main router to connect outside. I turned off the wireless on the router. It has 4 ports connected to SMC all with wires. First one connect to D-615(second router) Second one connect to D-815(third router) Third one connect to WD Mybook live(NAS HHD) Fourth one connect to TV player
2.    DLink 615. It is a wireless router. It located in the first floor as well, but close to bedroom. It has 4 ports, but I only use 3 of them connected to PC. Also there are wireless device need connect to this router as well.
3.    DLInk 815. It is a wireless router. It located in the second floor. It connected with 3 PCs and also accept wireless connection. The signal in second floor is very weak if using D-615 wireless connection.
I setup the SMC to 192.168.0.1 with DHCP, D-615 to 192.168.2.1 with DHCP and D-815 to 192.168.1.1. I cannot get rid of the second router, since SMC doesn't have enough wired port. And I need to D-815 because the signal problem. Wondering if this gonna work? Thanks.

Friday, September 17, 2010

Hacking CCTV Security Video Surveillance Systems with Metasploit

A new module for the Metasploit Framework, CCTV DVR Login Scanning Utility*, discovers and tests the security of standalone CCTV (Closed Circuit Television) video surveillance systems. Such systems are frequently deployed in retail stores, living communities, personal residences, and business environments as part of their physical security program. However, many of these systems are vulnerable to exploitation that can allow attackers remote access. Such remote access, enabled by default, can allow not only the ability to view real-time video, but control of the cameras (if supported), and provide access to archived footage.

Most owners of CCTV video surveillance systems may not even be fully aware of the device's remote access capabilities as monitoring may be conducted exclusively via the local video console. This further increases the likelihood of attackers gaining/persisting remote access, with no indication to the owner that their video surveillance system and archived footage may be accessed remotely.

Here at Gotham Digital Science, we often encounter video surveillance systems during penetration testing engagements – some of which may be exposed to the Internet, either intentionally or by accident. With any video surveillance system it is often interesting (and sometimes very important) to find out exactly what cameras are monitoring/recording within the environment. Furthermore, access to such systems can often be utilized to support physical security testing initiatives.

This module targets standalone CCTV video surveillance systems by MicroDigital, HIKVISION, CTRing, and a substantial number of other rebranded devices.

msf > use auxiliary/scanner/misc/cctv_dvr_loginmsf auxiliary(cctv_dvr_login) > set RHOSTS 10.10.1.14RHOSTS => 10.10.1.14msf auxiliary(cctv_dvr_login) > exploit

[*] 10.10.1.14:5920 CCTV_DVR - [001/133] - Trying username:'admin' with password:''
[-] 10.10.1.14:5920 CCTV_DVR - [001/133] - Failed login as: 'admin'
[*] 10.10.1.14:5920 CCTV_DVR - [002/133] - Trying username:'user' with password:''
[-] 10.10.1.14:5920 CCTV_DVR - [002/133] - Invalid user: 'user'
[*] 10.10.1.14:5920 CCTV_DVR - [003/133] - Trying username:'admin' with password:'admin'
[-] 10.10.1.14:5920 CCTV_DVR - [003/133] - Failed login as: 'admin'
[*] 10.10.1.14:5920 CCTV_DVR - [004/133] - Trying username:'admin' with       password:'1111'
[+] 10.10.1.14:5920 Successful login: 'admin' : '1111'
[*] Confirmed IE ActiveX HTTP interface (CtrWeb.cab v1,1,3,1): http://10.10.1.14:80
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
*CCTV DVR Login Scanning Utility:
This module tests for standalone CCTV DVR video surveillance deployments specifically by MicroDigital, HIKVISION, CTRing, and numerous other rebranded devices that are utilizing default vendor passwords. Additionally, this module has the ability to brute force user accounts. Such CCTV DVR video surveillance deployments support remote viewing through Central Management Software (CMS) via the CMS Web Client, an IE ActiveX control hosted over HTTP, or through Win32 or mobile CMS client software. By default, remote authentication is handled over port 5920/TCP with video streaming over 5921/TCP. After successful authentication over 5920/TCP this module will then attempt to determine if the IE ActiveX control is listening on the default HTTP port (80/TCP).
Module Name : auxiliary/scanner/misc/cctv_dvr_login
Authors: Mr. Justin Cacak

Portable CCTV Test Monitor with Camera Power

CCTV Camera Florida, announced the availability of the new MON-LCD25P portable CCTV test monitor with camera power. The LCD25P test monitor is a unique to other service monitors because it supplies power to the CCTV camera that it is being tested. The 2.5” LCD monitor provides a crystal clear image which allows installers to check the angle of view and focus of security cameras. Being that the LCD25P can supply power to a camera, installers can temporarily mount a camera or just hold it in position to confirm that the camera is supplying the right angle of view without going through the time and expense of running permanent power cable.

Commenting on the MON-LCD25P, CCTV Camera Pros co-founder and managing partner Mike Haldas says: “Our customers have been asking for a hand-held CCTV test monitor that also provides power to a camera for a while and we are very excited that we now have a manufacturing partner producing the MON-LCD25P for us to our specification and quality assurance standards. There are several test monitors on the market but none at this affordable price point that use the battery of the tester to also power the security camera being tested. Our product development team continues to listen to the demands of our customers and deliver the product solutions that they ask us for. I am very proud of how CCTV Camera Pros continues to adapt to market demands.”

The LCD25P comes complete with the following: 2.5” LCD hand-held test monitor, quick release neck strap, rechargeable battery with power supply, coaxial test cable with RCA and BNC connectors, camera power supply cable, and instruction manual. Click here for additional information about the MON-LCD25P portable CCTV test monitor.

Thursday, September 9, 2010

Connect Your DVR to Your LAN

we will assign your surveillance DVR an IP address.  Make sure that your DVR is connected to your network by attaching an ethernet cable to the back of your DVR and attaching the other end to your router.
1. Login to your DVR by pressing the menu button on the DVR or on the wireless remote control.
2.  When you are prompt to enter a password, just press the OK button on the DVR or remote.  The default admin password for the DVR is blank.  If you have already setup an admin password for your DVR, then enter this, then press OK.
3.   From your DVRs System menu, select External Device.
4.   On the External Device menu, select TCP/IP Setup.
5.   On the TCP/IP Setup screen, select DHCP setup and press enter.
6.  On the DHCP setup screen, confirm that the DHCP mode is set to automatic.  If it is not, adjust it so that it is by pressing the OK button. 
7. Select Detect IP and press enter.  The screen should refresh and populate values below.  Note the IP address.  This is the internal IP address that your router has assigned to your DVR.  This is the IP address that you will setup port forwarding for.
8.   After you have noted this IP address, select DHCP Mode and press OK.  The mode will be changed Manual.  This will ensure that your DVR will always be assigned the same IP address from your router. THIS IS IMPORTANT because if you loose power to your router, your router may assign your DVR a difference IP address and you will no longer be able to access the DVR remotely.
9.   Press the menu button once to return to the TCP/IP setup screen.

10. On the TCP/IP setup screen, select IP config setup and press enter.  On the IP config setup screen, confirm the port number of your DVR as seen below.  The default port is 8000.  If your DVR is not set to port 8000, please edit this value to set to 8000.  NOTE: please ignore that the below screen shot shows port 50000.  Port 50000 was used for the last version of the JPEG DVR.

Since most businesses and many households have local area networks (LANs), you will find the task of connecting a security DVR to a LAN is a common procedure. While it is a relatively simple thing for most security equipment installers, it is complex enough to confuse many users, especially users who have never worked with IP numbers before or have never worked with LAN topology.
Let's begin by identifying your LAN topology. To do this, locate your
1) security DVR,
2) the router attached to your security DVR and
3) a computer/workstation that is attached to the same router. It can also help if you locate
4) the modem  (or router AND modem)  that connects to the internet outside your home or facility - it is usually the first piece of hardware attached to the internet cable the comes through the wall. If you don't have #3 (computer attached to the same router shared by your security DVR), create one now and verify that the PC/workstation has a working connection. If you can't find or locate #4 (modem that provides connection to the internet) don't worry about it at this point since locating it may not be necessary.


Some typical network topologies are shown below. Figure #1 represents a simple network topology you might find in small business, while figure #2 represents a very simple network you would find in many homes. (Figure #2 actually represents the bare minimum hardware & connections you need for remote DVR monitoring/programming.).
Make sure (verify) your network connection is active and your PC can connect to the internet without any problems. Start at your PC and do the following:
1. Go to the COMMAND PROMPT. Different Windows versions have different ways of getting a COMMAND PROMPT. Most Windows versions let you reach a command prompt by going to START, then RUN, then type CMD into the window and hit ENTER. If successful you'll see a screen similar to Figure 3.
2.  Figure 3 shows a computer screen with the command prompt, and the PROGRAM FILES folder is open. That location should be fine. Type IPCONFIG/ALL and hit ENTER.  You should see a display screen similar to Figure 4.
( If you DON'T see Figure 4, they you are probably getting an error message. You'll need to find the person who installed your OS and find out why it doesn't have essential DOS files - you won't be able to continue this procedure without them.)
IPCONFIG is a standard Microsoft DOS command. You can read all about it at the official Microsoft website (http://technet.microsoft.com/en-us/library/bb490921.aspx), if you want. When you use this command as described here, it will report the computer's IP numbers so you can record them for your records. It does NOT change any settings or perform any kind of configuration process.
3. Write down the IP numbers shown under
IP ADDRESS (192.168.1.100),
SUBNET MASK (255.255.255.0),
GATEWAY (192.168.1.1) and
DNS SERVERS (206.222.98.82, 216.199.46.11, 206.222.98.82 - this particular computer has 3 DNS SERVER connections) and label them.
NOTE: Some versions of MS Windows will display IPv4 ADDRESS and an IPv6 ADDRESS - you want to use the IPv4 ADDRESS numbers.
4. Now get the IP Address of the security DVR. Got to the VRR andaccesssthe programing menu and get to the NETWORK settings area. Find the option that says DHCP (Dynamic Host Configuration Protocol) and ENABLE it..
5. Still at the DVR, write down the IP addresses it shows in the DHCP screen. Now turn OFF DHCP (or DISABLE it). If the IP addresses shown did not change, go to the next step. IF THEY DID CHANGE, re-enter them in the fields shown (DO NOT enable, or turn on, DHCP again).). If the IP addresses shown did not change, go to the next step. IF THEY DID CHANGE, re-enter them in the fields shown (DO NOT enable, or turn on, DHCP again).
6. Note the PORT NUMBERS shown in the DVR NETWORK screen. Write them down.
7. Test your configuration. Do the following at the PC/workstation that shares the same router as your DVR:
·   Get to the COMMAND PROMPT.
·   Type PING [IP Address], hit ENTER. (In our example the IP address is 192.168.1.100)
·   If you get a REPLY message, it communicated. If not, and you got a TIME OUT message of any kind then check your settings.
8. Your DVR has CLIENT SOFTWARE or REMOTE VIEWING SOFTWARE that was included in the box. Locate it and install it on the PC/workstation.
·   If your DVR has a webserver you can use IE Browser to communicate with the DVR - just type in the DVR IP Address in the URL bar of the browser.

Port Forwarding & Accessing Your DVR from Outside Your Network
To set up external (remote) viewing of your DVR and attached cameras, you will need to access your router. Refer to the router's User Manual to learn how to set port forwarding. If you can't find it, look here http://www.portforward.com/english/routers/port_forwarding/routerindex.htm. All routers have a different method of setting up port forwarding so it's impossible to instruct you here.
Program the router so that when it gets an internet request for the IP ADDRESS of the DVR it will refer (or activate) to the PORT NUMBER of the DVR (you wrote these numbers down earlier, right?). Normally most routers have a field for each physical connection and it will be obvious where to place the IP and PORT NUMBER information. If you can't find how to access your router, look at the router closely and make sure it is indeed a router and NOT a switcher. It should be ok if it's labeled ROUTER/SWITCHER but if it is an older piece of hardware and just says SWITCHER, discard it and get a true ROUTER.
Test the connection from an network external location. If the IP numbers and Port Forwarding numbers are set correctly you should be able to receive streaming video.

Using IE Browser VS Client/Remote Viewing Software
If the DVR has a webserver, then you can use IE Browser to connect to the DVR. Put the DVR IP address in the URL bar of the browser (like http://192.168.100.200, etc).
If the DVR does NOT have a webserver, then you will need to install the client/remote viewing software (that came with the DVR) on the PC/workstation you are using to view your security installation. The Client Software (or Remote Viewing Software) gives you additional features, such as ability to program motion detection, etc., that the IE Browser can not provide. Since each surveillance DVR has it's own client software, you'll have to refer to the software manual for help using their software.
Add caption