標籤:

怎樣保證圖片轉cad圖的質量

Scanning A Drawing For Optimal Raster To Vector Conversion Results

How to scan a drawing for raster to vector conversion

Not all drawings can be scanned to create a raster image that can be used for raster to vector conversion. For example:

  • Some drawings are so faint or so dirty that whatever you do you will not be able to create a clean enough scan for conversion.
  • Some drawings or drawing details are too small to scan well enough for vectorization, regardless of the scanning resolution you use.
  • Some drawings contain so many overlapping details – for example text written over drawing lines – that even if you get a perfect scan no raster to vector converter will be able to unscramble the information.

However, given a suitable drawing in good enough condition to scan well, you can eliminate many raster to vector conversion problems by being aware of the information on this page.

Color, grayscale or monochrome?

Most scanners give you the option of scanning in color, grayscale or monochrome. These options have different names depending on the make of scanner you have.

Color

Your scanner』s color option will normally create a raster image that contains 16.7 million colors.

You should only use this option if you are scanning a color drawing with a view to converting it to a color DXF file. Do not use your scanner』s color option if you are scanning a black and white drawing – it is easy to do this by accident as most scanners default to color.

If you are scanning a color drawing with a view to converting it to a color DXF file, experiment with your scanner』s settings until the colors on the raster image are as high contrast, vibrant and saturated as possible.

Warning: Color images can be very large. An E/A0 size drawing scanned in color at 300 dpi will take up about 385Mb of memory.

Grayscale

Your scanner』s grayscale option (often called black and white photo) will normally create an image that contains 256 shades of gray.

Grayscale images are not normally suitable for raster to vector conversion. You should only select grayscale if you are going to convert the grayscale image to black and white after scanning using Threshold functions.

Warning: Grayscale images can be very large. An E/A0 size drawing scanned in grayscale at 300 dpi will take up about 128Mb of memory.

Monochrome

Your scanner』s monochrome option (often called line art, black and white drawing or 1 bit) will create a much smaller image that contains two colors – black and white. This is the option you should normally choose when scanning a drawing for raster to vector conversion.

Thresholding

When you scan a drawing in monochrome your scanner or scanning software has to make a decision about which parts of the drawing to set to black in the raster image and which to set to white. This is called thresholding.

If your drawing is clean and sharp this is not normally a problem. However if your drawing has faint lines or a dirty or tinted background you will have to experiment with your scanner』s settings until you get a raster image where, as far as possible, the parts of the raster image that are supposed to be black are black and the parts that are supposed to be white are white.

If your scanner or scanning software sets too much of the drawing to white, it may contain breaks and holes and faint parts may be lost. If your scanner or scanning software sets too much of the drawing to black, text characters may 「bleed」 so that white spaces within them or between them become filled and speckles and dirt may appear in the background.

Too much white

Too much black

Optimal

While some scanners have good automatic thresholding and / or have software that makes setting an appropriate threshold easy, getting the best threshold on other scanners requires endless rescans.

If this is the case with your scanner, you may find it easier to scan your drawing in grayscale. You can then use Scan2CAD』s Threshold functions to create a black and white image after scanning. This will allow you to experiment with different levels of black and white without having to rescan the drawing.

Resolution

It is not true that 「the higher the scanner resolution, the better the vectorization results」. In fact, a high resolution scan can sometimes give you worse results than a low resolution scan!

That said, you should be aware that while you can decrease the resolution of an image after scanning you cannot increase it. Increasing resolution after scanning will not regain any lost detail. It will simply exacerbate 「steps」 in the image that will decrease the quality of any raster to vector conversion.

Therefore, it is better to err on the side of too high resolution rather than too low resolution when scanning. If you find your scan resolution is too high you can always decrease it after the fact using Scan2CAD』s File Menu > Raster > Statistics dialog.

For most drawings, a scan resolution of 200 to 400 dpi is optimal. However, if a drawing is small (e.g. a logo) or has fine detail, you may need a higher resolution.

Here are some pointers for choosing the right resolution:

  • If you are scanning a line drawing aim for lines about 5 pixels thick.
  • Lines and outlines should look smooth, not stepped:Smooth – GOOD

Stepped – BAD

  • Text characters and entities that are close together should be separated by clean white space:Completelyseparated –

  • GOODIncompletelyseparated –

  • BADCompletelyunseparated –BAD

Saving raster images

We recommend that you save your scanned drawings as TIFF files. If your scanned drawing is black and white, save it as a Group 4 TIFF file. This will compress the file without causing a loss in its quality.

Do not save your scans as multi layer/page TIFF files, which Scan2CAD does not support.

DO NOT save your images as JPEG. JPEG uses 「lossy compression」, which means that it discards data it thinks you can do without. This causes it to decrease the quality of scanned drawings by blurring the details and adding speckle artifacts.

The smudging and gray 「clouds」 surrounding the lines in the image below are typical artifacts caused by saving a drawing as JPEG.

Once you have damaged an image by saving it as JPEG, you cannot undo the damage by simply converting the JPEG image to TIFF. You will need to rescan the drawing.

VERY IMPORTANT: CHECK YOUR SCAN!

After scanning, check your scan.

  • Make sure that the full extents of the drawing have been captured.
  • Make sure the scan is not skew.If the scan is skew, rescan the drawing straight. While Scan2CAD can deskew scans, deskewing can decrease the quality of the scan, particularly if the scan is very skew.
  • Make sure that any text is legible.
  • Make sure that text characters and entities that are close together are separated by clean white space.

If they touch partially or completely, you need to experiment with your threshold settings and or scanning resolution.

  • Make sure that the drawing lines are solid, not broken.

If they are broken, you need to experiment with your threshold settings and or scanning resolution.


推薦閱讀:

園林專業的學生如何自學 CAD?
那些你知道,或是不知道的AutoCAD小秘密-010:繼續說說那些字體的事
你和IC 高手只差一節CAD 課 (續)
那些你知道,或是不知道的AutoCAD小秘密-008:DWT/DWS,CAD經理的福音
車企主要通過什麼方式來實現白車身設計變數的參數化從而實現其優化設計?

TAG:CAD | PDF | 圖片 |