CN105551069A - Method and system for real-time rapid generation of index image - Google Patents

Method and system for real-time rapid generation of index image Download PDF

Info

Publication number
CN105551069A
CN105551069A CN201510893767.6A CN201510893767A CN105551069A CN 105551069 A CN105551069 A CN 105551069A CN 201510893767 A CN201510893767 A CN 201510893767A CN 105551069 A CN105551069 A CN 105551069A
Authority
CN
China
Prior art keywords
attaching area
color value
colour attaching
colour
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510893767.6A
Other languages
Chinese (zh)
Other versions
CN105551069B (en
Inventor
魏晓文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Cotton Research of Chinese Academy of Agricultural Sciences
Original Assignee
Institute of Cotton Research of Chinese Academy of Agricultural Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Cotton Research of Chinese Academy of Agricultural Sciences filed Critical Institute of Cotton Research of Chinese Academy of Agricultural Sciences
Priority to CN201510893767.6A priority Critical patent/CN105551069B/en
Publication of CN105551069A publication Critical patent/CN105551069A/en
Application granted granted Critical
Publication of CN105551069B publication Critical patent/CN105551069B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Abstract

The invention discloses a method and system for real-time rapid generation of an index image, and relates to the field of image texts. The method includes the steps of: obtaining a coloring area of a target index image, and performing association setting on the serial number of the coloring area and the position of an existing color value of the coloring area on a pallet; obtaining a request for a color change of the coloring area; obtaining the position B of the color value associated with the serial number of the coloring area A in the request; adjusting an RGB color sequence and the number of occupied bytes of the coloring area A according to the picture type of a target index picture and calculating a color value D of the coloring area A, and writing the color value D in the position B of the pallet, thereby completing color conversion of the target index picture. The system comprises a picture analysis module, a pallet, an associate module, a request receiving and query module and a calculation and writing-in module. The method and system for real-time rapid generation of an index image are efficient and rapid in conversion processing, do not cause any change or damage to the image shape and image quality, and are wide in range of application.

Description

A kind of generation method and system real-time of thumbnail
Technical field
The present invention relates to pictograph field, particularly relate to a kind of generation method and system real-time of thumbnail.
Background technology
In the application of Geographic Information System class, often need to carry out conversion process to image color, particularly in the real-time generative process of layout, efficiently color transformed process is particularly important fast.For the process of the image files such as raster format in computer program, mostly consistent with the man-machine dialogue system method in image processing software, need when converting large area color lump color to compare the color of certain pixel adjacent position pixel in image, to determine whether convert accordingly.And the efficiency of this comparative analysis process is very low, particularly in compressed image file due to the reduction that will decompress, its treatment effeciency is just lower.For this reason, also have and take to make many parts of different colors in advance so that the solution called at any time, but existence is difficult to the change of reflection real time data and the low inferior problem of drawing efficiency.
Summary of the invention
The object of the present invention is to provide a kind of generation method and system real-time of thumbnail, thus solve the foregoing problems existed in prior art.
To achieve these goals, the generation method real-time of thumbnail of the present invention, the method comprises:
S1, obtains the colour attaching area of target thumbnail, is carried out associating in the position of existing to the numbering of colour attaching area and colour attaching area color value in palette arranging;
S2, obtains the request of colour attaching area changes colour;
S3, obtains the position B of color value in palette associated with the numbering of colour attaching area A in request;
S4, according to the RGB color sequences of the picture/mb-type of target index picture adjustment colour attaching area A with take byte number and calculate the color value D of colour attaching area A;
S5, is written to color value D in the position B of palette, completes the color transformed of target index picture.
Preferably, step S1, the numbering of described colour attaching area and the described color value position one_to_one corresponding in palette is arranged.
Preferably, a colour attaching area is endowed unique color value, and a kind of color value can be endowed more than one colour attaching area.
Preferably, further comprising the steps of before step S1:
S01, the type according to target index picture arranges n color value in palette block, and obtain and the essential information storing each color value and its position in palette, described n is more than or equal to 1.
Preferably, the colour attaching area of described acquisition target thumbnail realizes by the following method: utilize image editing software compiling objective index picture, and obtain m colour attaching area of described Target Photo, described m is more than or equal to 1.
Preferably, described picture/mb-type comprises index class image file and can the non-index image file of generating indexes class.
More preferably, described picture/mb-type comprises png, bmp, jpg, tiff, gif, pcx, tga, exif, fpx, svg, psd, cdr, pcd, dxf, ufo, eps, ai, raw.
Preferably, in step s 2, further comprising the steps of:
S21, judges the quantity of the colour attaching area requiring color to change in the request of colour attaching area changes colour, if quantity is 1, then directly enters S3; If quantity is more than or equal to 2, is then sorted in the colour attaching area needing color to change, then enter S21;
S21, judges that the colour attaching area needing color to change requires that whether the color value of change is identical, if not identical, then sequentially enters S3; If identical, then enter S22;
S22, associates the position of color value in palette associated with the color value same colored district of change, after then obtaining the numbering of wherein any one colour attaching area, enters S3.
The invention discloses a kind of system realizing the method that generates real-time of described thumbnail, this system comprises:
Picture analyzing module: utilize image editing software compiling objective index picture, obtain m colour attaching area of described target index picture, and be numbered colour attaching area, described m is more than or equal to 1;
Palette: be responsible for the quantity according to picture/mb-type adjustment color value and each color value position of imparting;
Relating module: the position of existing to the numbering of colour attaching area and colour attaching area color value in palette is carried out associating arrange;
Request receiving and search module: the request receiving colour attaching area changes colour, and request is analyzed, search simultaneously with ask in the position of color value in palette that associate, the colour attaching area that associates;
Calculate writing module: according to the RGB color sequences of the picture/mb-type of target index picture adjustment colour attaching area A with take byte number and calculate the color value D of colour attaching area A, color value D is written in the position B of palette, completes the color transformed of target index picture.
Preferably, described request receives and searches module and comprises:
Judge module one: the quantity judging the colour attaching area requiring color to change in the request of colour attaching area changes colour, and result is sent to search module or judge module two;
Judge module two: judge need color change colour attaching area require change color value whether identical, and result is sent to search module or restriction module;
Limit module: associated the position of color value in palette associated with the color value same colored district of change, then obtain the numbering of wherein any one colour attaching area, then result sent to and search module;
Search module: the numbering obtaining the colour attaching area that judge module one, judge module two and restriction module send, then search the position B of color value in palette associated with the numbering of described colour attaching area A.
The invention has the beneficial effects as follows:
1, conversion process efficient quick, each colour attaching area only needs the color value of write 3 byte;
2, any change and infringement are not caused to picture shape and picture quality;
3, the color transformed process of all colours index class image file (BMP, GIF, PNG etc.) is applicable to;
4, be specially adapted in GIS application, the automatic generation of real-time distribution figure etc.
Accompanying drawing explanation
Fig. 1 is the method flow of the generation real-time schematic diagram of described thumbnail;
Fig. 2 is the structural representation of generation system real-time of described thumbnail;
Fig. 3 is request receiving described in Fig. 2 and the structural representation searching module.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with accompanying drawing, the present invention is further elaborated.Should be appreciated that embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Embodiment
With reference to Fig. 1, the generation method real-time of thumbnail described in the present embodiment, the method comprises:
S1, obtains the colour attaching area of target thumbnail, is carried out associating in the position of existing to the numbering of colour attaching area and colour attaching area color value in palette arranging;
S2, obtains the request of colour attaching area changes colour;
S3, obtains the position B of color value in palette associated with the numbering of colour attaching area A in request;
S4, according to the RGB color sequences of the picture/mb-type of target index picture adjustment colour attaching area A with take byte number and calculate the color value D of colour attaching area A;
S5, is written to color value D in the position B of palette, completes the color transformed of target index picture.More detailed explanation illustrates:
(1) step S1, the numbering of described colour attaching area and the described color value position one_to_one corresponding in palette is arranged.
A colour attaching area is endowed unique color value, and a kind of color value can be endowed more than one colour attaching area.
(2) further comprising the steps of before step S1:
S01, the type according to target index picture arranges n color value in palette block, and obtain and the essential information storing each color value and its position in palette, described n is more than or equal to 1.
(3) colour attaching area of described acquisition target thumbnail realizes by the following method: utilize image editing software compiling objective index picture, and obtain m colour attaching area of described Target Photo, described m is more than or equal to 1.
(4) described picture/mb-type comprises index class image file and can the non-index image file of generating indexes class.Described picture/mb-type comprises more specifically: png, bmp, jpg, tiff, gif, pcx, tga, exif, fpx, svg, psd, cdr, pcd, dxf, ufo, eps, ai, raw.
(5) in step s 2, further comprising the steps of:
S21, judges the quantity of the colour attaching area requiring color to change in the request of colour attaching area changes colour, if quantity is 1, then directly enters S3; If quantity is more than or equal to 2, is then sorted in the colour attaching area needing color to change, then enter S21;
S21, judges that the colour attaching area needing color to change requires that whether the color value of change is identical, if not identical, then sequentially enters S3; If identical, then enter S22;
S22, associates the position of color value in palette associated with the color value same colored district of change, after then obtaining the numbering of wherein any one colour attaching area, enters S3.
Realize a system for the method that generates real-time of thumbnail as described embodiments, this system comprises:
Picture analyzing module: utilize image editing software compiling objective index picture, obtain m colour attaching area of described target index picture, and be numbered colour attaching area, described m is more than or equal to 1;
Palette: be responsible for the quantity according to picture/mb-type adjustment color value and each color value position of imparting;
Relating module: the position of existing to the numbering of colour attaching area and colour attaching area color value in palette is carried out associating arrange;
Request receiving and search module: the request receiving colour attaching area changes colour, and request is analyzed, search simultaneously with ask in the position of color value in palette that associate, the colour attaching area that associates;
Calculate writing module: according to the RGB color sequences of the picture/mb-type of target index picture adjustment colour attaching area A with take byte number and calculate the color value D of colour attaching area A, color value D is written in the position B of palette, completes the color transformed of target index picture.
Wherein, described request receives and searches module and comprises:
Judge module one: the quantity judging the colour attaching area requiring color to change in the request of colour attaching area changes colour, and result is sent to search module or judge module two;
Judge module two: judge need color change colour attaching area require change color value whether identical, and result is sent to search module or restriction module;
Limit module: associated the position of color value in palette associated with the color value same colored district of change, then obtain the numbering of wherein any one colour attaching area, then result sent to and search module;
Search module: the numbering obtaining the colour attaching area that judge module one, judge module two and restriction module send, then search the position B of color value in palette associated with the numbering of described colour attaching area A.
By adopting technique scheme disclosed by the invention, obtain effect useful as follows: conversion process efficient quick, each colour attaching area only needs the color value of write 3 byte; Any change and infringement are not caused to picture shape and picture quality; Be applicable to the color transformed process of all colours index class image file (BMP, GIF, PNG etc.); Be specially adapted in GIS application, the automatic generation of real-time distribution figure etc.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should look protection scope of the present invention.

Claims (10)

1. a generation method real-time for thumbnail, is characterized in that, the method comprises:
S1, obtains the colour attaching area of target thumbnail, is carried out associating in the position of existing to the numbering of colour attaching area and colour attaching area color value in palette arranging;
S2, obtains the request of colour attaching area changes colour;
S3, obtains the position B of color value in palette associated with the numbering of colour attaching area A in request;
S4, according to the RGB color sequences of the picture/mb-type of target index picture adjustment colour attaching area A with take byte number and calculate the color value D of colour attaching area A;
S5, is written to color value D in the position B of palette, completes the color transformed of target index picture.
2. method according to claim 1, it is characterized in that, step S1, the numbering of described colour attaching area and the described color value position one_to_one corresponding in palette is arranged.
3. method according to claim 1, it is characterized in that, a colour attaching area is endowed unique color value, and a kind of color value can be endowed more than one colour attaching area.
4. method according to claim 1, is characterized in that, further comprising the steps of before step S1:
S01, the type according to target index picture arranges n color value in palette block, and obtain and the essential information storing each color value and its position in palette, described n is more than or equal to 1.
5. method according to claim 1, it is characterized in that, the colour attaching area of described acquisition target thumbnail realizes by the following method: utilize image editing software compiling objective index picture, and obtain m colour attaching area of described Target Photo, described m is more than or equal to 1.
6. method according to claim 1, is characterized in that, described picture/mb-type comprises index class image file and can the non-index image file of generating indexes class.
7. method according to claim 6, it is characterized in that, described picture/mb-type comprises png, bmp, jpg, tiff, gif, pcx, tga, exif, fpx, svg, psd, cdr, pcd, dxf, ufo, eps, ai, raw.
8. method according to claim 1, is characterized in that, in step s 2, further comprising the steps of:
S21, judges the quantity of the colour attaching area requiring color to change in the request of colour attaching area changes colour, if quantity is 1, then directly enters S3; If quantity is more than or equal to 2, is then sorted in the colour attaching area needing color to change, then enter S21;
S21, judges that the colour attaching area needing color to change requires that whether the color value of change is identical, if not identical, then sequentially enters S3; If identical, then enter S22;
S22, associates the position of color value in palette associated with the color value same colored district of change, after then obtaining the numbering of wherein any one colour attaching area, enters S3.
9. realize a system for the method that generates real-time of thumbnail as described in claim 1-7 any one, it is characterized in that, this system comprises:
Picture analyzing module: utilize image editing software compiling objective index picture, obtain m colour attaching area of described target index picture, and be numbered colour attaching area, described m is more than or equal to 1;
Palette: be responsible for the quantity according to picture/mb-type adjustment color value and each color value position of imparting;
Relating module: the position of existing to the numbering of colour attaching area and colour attaching area color value in palette is carried out associating arrange;
Request receiving and search module: the request receiving colour attaching area changes colour, and request is analyzed, search simultaneously with ask in the position of color value in palette that associate, the colour attaching area that associates;
Calculate writing module: according to the RGB color sequences of the picture/mb-type of target index picture adjustment colour attaching area A with take byte number and calculate the color value D of colour attaching area A, color value D is written in the position B of palette, completes the color transformed of target index picture.
10. system according to claim 9, is characterized in that, described request receives and searches module and comprises:
Judge module one: the quantity judging the colour attaching area requiring color to change in the request of colour attaching area changes colour, and result is sent to search module or judge module two;
Judge module two: judge need color change colour attaching area require change color value whether identical, and result is sent to search module or restriction module;
Limit module: associated the position of color value in palette associated with the color value same colored district of change, then obtain the numbering of wherein any one colour attaching area, then result sent to and search module;
Search module: the numbering obtaining the colour attaching area that judge module one, judge module two and restriction module send, then search the position B of color value in palette associated with the numbering of described colour attaching area A.
CN201510893767.6A 2015-11-30 2015-11-30 A kind of real-time generation method and system of thumbnail Expired - Fee Related CN105551069B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510893767.6A CN105551069B (en) 2015-11-30 2015-11-30 A kind of real-time generation method and system of thumbnail

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510893767.6A CN105551069B (en) 2015-11-30 2015-11-30 A kind of real-time generation method and system of thumbnail

Publications (2)

Publication Number Publication Date
CN105551069A true CN105551069A (en) 2016-05-04
CN105551069B CN105551069B (en) 2018-08-14

Family

ID=55830245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510893767.6A Expired - Fee Related CN105551069B (en) 2015-11-30 2015-11-30 A kind of real-time generation method and system of thumbnail

Country Status (1)

Country Link
CN (1) CN105551069B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776982A (en) * 2018-05-31 2018-11-09 苏州蜗牛数字科技股份有限公司 A kind of display methods based on palette compressed picture
CN108986180A (en) * 2018-06-07 2018-12-11 阿里巴巴集团控股有限公司 A kind of generation method of palette, device and electronic equipment
CN115457167A (en) * 2022-09-21 2022-12-09 山东大学 Color sorting-based palette design system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1177172A (en) * 1996-06-29 1998-03-25 三星电子株式会社 Sub-picture restoring method and apparatus in digital versatile disk system
US6819793B1 (en) * 2000-06-30 2004-11-16 Intel Corporation Color distribution for texture and image compression
CN1568483A (en) * 2001-10-11 2005-01-19 国际商业机器公司 Color bitmap normalization
US20080030517A1 (en) * 2006-08-03 2008-02-07 Via Technologies, Inc. Color-revealing method, color-changing method and color-processing device
US20080062480A1 (en) * 2006-09-08 2008-03-13 Konica Minolta Business Technologies, Inc., Image processing system and image processing method
CN102289497A (en) * 2011-08-22 2011-12-21 上海梅花信息有限公司 Document preview image generating system and method
CN102523367A (en) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 Real-time image compression and reduction method based on plurality of palettes
CN102881026A (en) * 2012-08-15 2013-01-16 大连理工大学 Palette device and generation method for image with transparency information
CN103209326A (en) * 2013-03-29 2013-07-17 惠州学院 PNG (Portable Network Graphic) image compression method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1177172A (en) * 1996-06-29 1998-03-25 三星电子株式会社 Sub-picture restoring method and apparatus in digital versatile disk system
US6819793B1 (en) * 2000-06-30 2004-11-16 Intel Corporation Color distribution for texture and image compression
CN1568483A (en) * 2001-10-11 2005-01-19 国际商业机器公司 Color bitmap normalization
US20080030517A1 (en) * 2006-08-03 2008-02-07 Via Technologies, Inc. Color-revealing method, color-changing method and color-processing device
US20080062480A1 (en) * 2006-09-08 2008-03-13 Konica Minolta Business Technologies, Inc., Image processing system and image processing method
CN102289497A (en) * 2011-08-22 2011-12-21 上海梅花信息有限公司 Document preview image generating system and method
CN102523367A (en) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 Real-time image compression and reduction method based on plurality of palettes
CN102881026A (en) * 2012-08-15 2013-01-16 大连理工大学 Palette device and generation method for image with transparency information
CN103209326A (en) * 2013-03-29 2013-07-17 惠州学院 PNG (Portable Network Graphic) image compression method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
卢强等: "《用VC实现位图文件处理》", 《电子技术》 *
周经伦等: "《面向视觉的调色板技术》", 《微型机与应用》 *
支建伟: "《一种使用调色板的图像颜色量化设计》", 《中国有线电视》 *
童韬等: "《C++Builder环境下调色板的使用》", 《现代计算机(专业版)》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776982A (en) * 2018-05-31 2018-11-09 苏州蜗牛数字科技股份有限公司 A kind of display methods based on palette compressed picture
CN108986180A (en) * 2018-06-07 2018-12-11 阿里巴巴集团控股有限公司 A kind of generation method of palette, device and electronic equipment
CN115457167A (en) * 2022-09-21 2022-12-09 山东大学 Color sorting-based palette design system

Also Published As

Publication number Publication date
CN105551069B (en) 2018-08-14

Similar Documents

Publication Publication Date Title
CN105005642B (en) A kind of threedimensional model batch format conversion and light weight method
CN109919331A (en) A kind of airborne equipment intelligent maintaining auxiliary system and method
CN103473056B (en) A kind of remote measurement configuration file automatic generation method
CN104035754A (en) XML (Extensible Markup Language)-based custom code generation method and generator
JP2003507793A (en) System and method for performing region-based image retrieval using color-based segmentation
CN105551069A (en) Method and system for real-time rapid generation of index image
CN104766076A (en) Detection method and device for video images and texts
CN109446689A (en) DC converter station electrical secondary system drawing recognition methods and system
CN105701251A (en) Data export and import method based on object definition
CN104346384A (en) Method and device for processing small files
CN102157003A (en) Automatic configuration method for annotation label of map under digital environment
CN104123376B (en) A kind of intelligent text collecting method and system based on row template
CN104298705A (en) Converting method of relational data and unstructured data
CN105872511A (en) Method for improving color temperature consistency of flat panel television through multiple gamma curves
CN103838937A (en) Energy consumption simulation modeling system
CN109344468A (en) CAD diagram paper introduction method, system and computer readable storage medium
CN109871813B (en) Real-time image tracking method and system
CN106570858B (en) AOI component detection block method is automatically generated based on PCB coordinate transform
CN103455964A (en) Case clue analyzing system and method based on case information
CN101594481A (en) A kind of method of making and revising captions
CN111666442B (en) Image retrieval method and device and computer equipment
CN103279586A (en) Method for quadratic mapping of finite element temperature field
CN103065343B (en) A kind of vector map standard conversion method based on Spatial Data Model
CN104572730A (en) Method and device for importing and exporting digital resources
CN105430496A (en) Media program processing method, media program processing device and media program publishing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180814

Termination date: 20211130

CF01 Termination of patent right due to non-payment of annual fee