当前位置:文档之家› Combining Information Sources for Video Retrieval The Lowlands Team at TRECVID

Combining Information Sources for Video Retrieval The Lowlands Team at TRECVID

Combining Information Sources for Video Retrieval The Lowlands Team at TRECVID
Combining Information Sources for Video Retrieval The Lowlands Team at TRECVID

Combining Information Sources for Video Retrieval

The Lowlands Team at TRECVID2003

Thijs Westerveld Tzvetanka Ianeva??,Lioudmila Boldareva?,Arjen P.de Vries

and Djoerd Hiemstra?

Centrum voor Wiskunde en Informatica(CWI) Amsterdam,The Netherlands {thijs,arjen}@cwi.nl

?Departament

d’Inform`a tica

Universitat de Val`e ncia

Val`e ncia,Spain

tzveta.ianeva@uv.es

?Department of Computer

Science

University of Twente

Enschede,The Netherlands

{boldarli,hiemstra}@cs.utwente.nl

Abstract

The previous video track results demonstrated that it is far from trivial to take advantage of multiple modalities for the video retrieval search task.For almost any query,results based on ASR transcripts have been better than any other run.This year’s main success in our runs is that a combination of ASR and visual performs better than either alone!In addition we experimented with dynamic shot models, combining topic examples,feature extraction and in-teractive search.

1Introduction

Often it is stated that a successful video retrieval sys-tem should take advantage of information from all available sources and modalities.Merging knowledge from for example speech,vision,and audio would yield better results than using only one of them.But previous video track results demonstrated that it is far from trivial to take advantage of multiple modal-ities for a video retrieval search task.

For this year’s TRECVID workshop,we experi-mented with combining di?erent types of informa-

?The work has been carried out while at CWI,supported by grants GV FPIB01362and CTESRR/2003/43

tion:

?combining di?erent models/modalities

?combining multiple example images

?combining model similarity and human-judged

similarity

The basic retrieval models we use to investigate the merging of di?erent sources are the same models we used last year[12],they are described brie?y in sec-tion2and more extensively in[13].Section2.1de-scribes a dynamic variant of the model that allows for describing spatio-temporal information as opposed to the spatial information captured in the basic models. These dynamic models can describe shots instead of still keyframes.For modelling the ASR transcripts, we use a basic language modelling approach(see Sec-tion2.2).The interactive retrieval setup(Section2.3) builds upon the visual models and language mod-els.After the introduction of the separate models, we present experiments for combining textual and visual information(Section4),combining di?erent examples(Section5)and the feature task(Section 6).Combining automatic similarity and interactive similarity is discussed in Section7.

1

2Generative Probabilistic Re-trieval Model

The retrieval model we use to rank video shots is a generative model inspired by the language modelling approach to information retrieval[9,6]and a simi-lar probabilistic approach to image retrieval[10].We present–concisely–the visual part of the model,re-ferring the interested reader to[13]for more details. The visual model ranks images by their probability of generating the samples(pixel blocks)in one or more query example(s)[13].The model is smoothed using background probabilities,calculated by marginalisa-tion over the collection.So,a collection imageωi is compared to an example image x consisting of N samples(x=(x1,x2,...,x N))by computing its abil-ity to explain the samples x.The retrieval status value(RSV)of an imageωi is de?ned as:

RSV(ωi)=1

N

N

j=1

log[κP(x j|ωi)+(1?κ)P(x j)],

(1)

whereκis a mixing parameter.

Collection imagesωi are modelled as mixtures of Gaussians with a?xed number of components C[10, 13]:

P(x|ωi)=N C

c=1

P(C i,c)G(x,μi,c,Σi,c),(2)

where N C is the number of components in the mix-ture model,C i,c is component c of class modelωi and G(x,μ,Σ)is the Gaussian density with mean vector μand co-variance matrixΣ:

G(x,μ,Σ)=

1

n

e?12(x?μ)TΣ?1(x?μ),

where n is the dimensionality of the feature space and (x?μ)T is the matrix transpose of(x?μ).

The samples are8by8pixel blocks,described by their DCT coe?cients and their position in the image plane;the models are trained on these using standard EM[3],assuming a diagonal co-variance matrix.

2.1Dynamic Model

The Dynamic model is a Gaussian Mixture Model in DCT-space-time domain[7].Instead of modelling just a single image(keyframe)we model a one-second video sequence around the keyframe as a single en-tity.The dynamic model is an extension of the static model,the sampling process is very similar.We take 29frames around the keyframe and cut them in dis-tinct blocks of8by8pixels.Each block is then de-scribed by its DCT coe?cients,its x and y position in the image plane and its position in time(normalised between0and1).Given this setup,the static model can be seen as a special case of the dynamic model where the temporal feature takes a?xed value of0.5. The intuitive explanation in this case is:we do not know what is happening before and after the central time moment matching the keyframe.

The number of samples for training the dynamic model is much larger than for the static model(i.e. 29times as large).The training process remains the same:feature vectors are fed to the EM algorithm to?nd the parametersμc,Σc,and P(C c).Because we use diagonal covariance matrices(Σc),the compo-nents are aligned to the axes.The resulting models capture the appearance and disappearance of objects, but not all temporal information.Figure1shows an example video sequence and a visualisation of the re-sulting model.It is easy to see how well the model ?ts the data,the tree in the top left corner is only visible at the beginning of the sequence.The corre-sponding component in the model also disappears at about t=0.5In other words,the GMM captures the disappearing of the tree.This e?ect is impossible to be captured from the static model where time is not taken into account.

2.2ASR

The ASR approach used the same hierarchical lan-guage model as last year[12].We model video as a sequence of scenes,each consisting of a sequence of shots.The generative model mixes the di?erent lev-els of the hierarchy,with models for shots and scenes. Given a query with N t terms q=(q1,q2,...,q N

t

),the RSV of a shotωi is de?ned as:

2

1

2

3

4

5

6

78

910

1112

13

14

15

16

1718

19

20

21

22

23

24

2526272829

Figure 1:A shot represented by 29frames around the keyframe (top)and a 3D visualisation of dynamic GMM computed from it (bottom).The bottom im-age shows mean colour and mean texture of the com-ponents where the standard deviation from the mean position in the x ?y ?t is below 2.Prior probabilities and variance in colour and texture are not visualised.RSV(ωi )=

1N t

N t

j =1

log[λShot P (q j |Shot i )+

λScene P (q j |Scene i )+λColl P (q j )]with λColl =1?λShot ?λScene

(3)

Shot i and Scene i are the shot and scene to which ωi belongs.The main idea behind this approach is that a good shot contains the query terms and is part of a scene having more occurrences of the query terms.Also,by including scenes in the ranking func-tion,we hope to retrieve the shot of interest,even if the video’s speech describes it just before it begins or just after it is ?nished.Because scene boundaries are not known,we assume (pragmatically)that each sequence of 5consecutive shots forms a scene.

The features in the ASR model are simply the word tokens from the LIMSI transcripts [5].We esti-mate the foreground (P (q j |Shot i ))and background (P (q j ))probabilities in Equation 3by taking the term frequency and document frequency respectively [6].We used the TREC-2002video search collection to ?nd the optimal values for the mixing parameters:λShot =0.090,λScene =0.210,and λColl =0.700.

2.3Interactive retrieval

In an interactive setting,the models above might be used as follows:First the user enters a text query that uses the speech recognition transcripts.As a result,he/she gets a screen full of video key frames.The user might now:a )rephrase his/her query,b )walk down the ranked list,i.e.look at the next screen of key frames,or c )use relevance feedback,i.e.retrieve key frames that are similar to one or more of the

key frames currently on the screen.The text queries (see Section 2.2)can be evaluated almost instantly by the system.Whenever the system has to ?nd sim-ilar images,however,the Gaussian mixture models of Equation 1are used.It is well-known that simi-larity search using low level features does not scale very well.Given one example image,ranking the

32,000key frames of the collection would take about 15minutes on a fairly fast personal computer.Rank-ing 3.2million key frames would take approximately 100times as long.

3

To get reasonable on-line performance,we used a brute-force solution by pre-computing for each key frame x its nearest neighboursωi(see e.g.[4]),ac-cording to the Gaussian mixture models.In practice, this means we have to calculate all image-image sim-ilarity pairs,and then take those image pairs that are nearest neighbours.The image pairs(x,ωi)are stored together with the probability P(x|ωi)de?ned by Equation1in an access structure called associa-tive https://www.doczj.com/doc/ea8222878.html,ing the associative matrix,we avoid expensive run time distance computations[1].To search for images that are similar to two or more ex-ample images x j,the model’s probabilities P(x|ωi) are combined by assuming conditional independence between selected images x1,x2,...given the hypoth-esised target imageωi:

P(x1,x2,...|ωi)=

n

j=1

P(x j|ωi)(4)

For images that are not among the nearest neighbours (that is,for which P(x j|ωi)is not stored in the asso-ciative matrix),we use a back-o?mechanism,e?ec-tively replacing P(x j|ωi)with a smoothing constant ˉp.

Besides e?cient real time access to similar images, the associative matrix serves another purpose:It can be trained from user interaction.By collecting user feedback,we hope to adapt the matrix in such a way that it represents user’s associations between images.

A possible interpretation of an image pair(x j,ωi)in the matrix is the following:“Users that were looking for imageωi selected image x j”1,or more precisely, 80%of the users that sought imageωi selected image x j as relevant if P(x j|ωi)=0.8.

3Experimental Setup

3.1Building Models and Queries

The search collection is indexed using the proce-dures described above.For each shot,we build a static model a dynamic model and a Language Model.

1As in collaborative?ltering used by https://www.doczj.com/doc/ea8222878.html,:“Customers who bought this book also bought:...”

Building queries from the topic descriptions is mostly automatic.The only manual action in construct-ing visual queries was selecting one or more image or video examples to be used for ranking.A tex-tual query was constructed manually for each topic be taking only the content words from the topic de-scription.From there on,the whole retrieval process was automatic,except for the experiments described in section5.1.All image examples are rescaled to at most272x352pixels and then jpg compressed with a quality level of20%to match size and quality of the collections videos.Further experiments are needed to test if this scaling and degrading of queries in?u-ences retrieval results.The interactive experiments only used textual queries;not the image examples from the topics.

3.2Guarding Covariance

In estimating GMMs from images using EM,it some-times happens that one of the components collapses onto a single point in features space.This means,the covariance of such a component tends to zero and the component explains nothing except for this particular point in feature space.For example in the TRECVID dataset,it happens that a component collapses onto perfectly black or perfectly white blocks.In retrieval such singular solutions can cause under?ow division-by-zero problems and queries that happen to have samples that fall into the exact center of a singular component(e.g.queries with perfectly black blocks), will get in?nity scores.To work around this,in our of-?cial submissions,we set the prior probability of com-ponents with a covariance smaller than some thresh-hold to zero.E?ectively,this means we ignored these components during retrieval.An alternative,better, solution is to guard the covariances during training of the models,and to make sure they do not get too small.This is what we did for the static model in post hoc experiments.In the following,both the of-?cial scores and the post hoc scores are listed,they are labeled o?cial and COVguard respectively.

4

Description MAP MAP

o?cial COVguard ASR only.130

static only.022.025

static+ASR.105.134 dynamic only.022

dynamic+ASR.132

ARS+noAnchor.133

static+noAnchor.022

static+ASR+noAnchor.106

dynamic+noAnchor.022

dynamic+ASR+noAnchor.135

Table1:Mean Average Precision(MAP)for ASR only,visual only and combined runs(static and dy-namic models).

4Combining Modalities

If we(unrealistically)assume textual and visual in-formation are independent,we can easily compute a joint probability of observing query text and visual example from a document.Under this assumption, we can simply multiply the individual probabilities (or sum the log probabilities from Equations1and 3).In previous TREC experiments,we found that such a combination strategy works well provided that the individual runs each have useful results[12].This year,this seems to be the case:a combination of the dynamic models described in Section2.1and ASR (Section2.2)outperforms the individual runs(see Ta-ble1).In the o?cal results,the static run performs worse than ASR only.But,after retraining the static models and guarding the covariances in the process (see Section3.2),the static+ASR combination run also outperforms the monomodal variants.However, rebuilding the dynamic models in the same way is expected to give a similar increase in performance.2 Therefore,the comparison in the remainder of this section is based on the o?cial results.The dynamic combination outperforms the static one,even though the MAP score for static only is the same as that for 2At the moment,we are recomputing the dynamic models to verify this.dynamic only.MAP scores hide a lot of information though.The dynamic run has a higher initial preci-sion(See Figure2),and thus in some ways,the dy-namic run is better than the static run and therefore more useful in a combination.While the dynamic models represent some of the temporal aspects of a shot,like objects(dis-)appearing,the main advan-tage over the static models seems to result from two (related)aspects:more training data describing the visual content,and less dependency on choosing an appropriate keyframe.

Figure2:Recall-Precision graph for static,dynamic and ASR runs as well as multimodal combinations. Results of the dynamic+ASR are further improved by?ltering out shots with anchor persons.These shots are identi?ed by computing the likelihood of generating the set of frames annotated with the labels news person face and studio setting from the shot models.3The1077shots4with the highest likelihood are assumed to contain anchor persons and are?l-tered out.The resulting MAPs are shown in Table1.

A detailed analysis of the combination of ASR and visual results can be found in[2].

3For computational reasons,we computed the likelihood of a subset of the samples from the frames,instead of the likelihood of the full set.

4After1077documents,we noticed a drop in Anchor person likelihood scores.

5

5Combining Topic Examples 5.1Merging Run Results

Last year,we found combining multiple examples in one query is far from trivial[12].Con?icting exam-ples(like di?erent views under di?erent weather con-ditions)can easily cause bad results.Still,if we use just one’best’topic example as a query there’s a risk of missing a lot of relevant material.Suppose, for example,we selected a close up shot of a point being scored in basketball,and most of the relevant shots in the collection happen to be overview shots of the playing?eld.This year,instead of combining multiple examples in a single query,we experiment with running separate queries for each example and merging run results afterwards.For each topic,we manually select a set of’good’examples,run sepa-rate queries for each example,and then merge the results using a simple round-robin approach.Dupli-cates are?ltered out afterwards.

In addition to this within topic merging of exam-ples,we also experiment with merging results from di?erent models.The goal here is to?nd out if it is possible to decide in advance what would be a good model to use for a given topic.When there are only still image examples,one could decide to use the static models,whilst the dynamic model might be used for video examples.For each topic,we man-ually selected a visual model to be used.The main strategy is the one described above:dynamic models for video examples and static ones for still image ex-amples(more precisely,‘Topic Models’,see Section 5.2).In addition,for topics where this seems apro-priate,we?lter out unwanted shots from the results set.The approach is similar to the one described in [8].We use Anchor Person,people,studio setting and weather maps?lters and remove those shots that have a high likelihood5of explaining annotated samples of the given feature(See also section6).

The MAP of this merging run is.039,the high-est among the runs that use only visual information, even though,for some topics,it contains results from the disappointing Topic Model run(See Section5.2).

5High means within some top K,where K is set using sep-arate training data.

It may be interesting to see if topic speci?c model selection can be useful.

5.2Building Topic Models

Instead of explaining the query samples from the doc-ument models(and combining the results for di?erent examples afterwards),we could go the other way and explain document samples from query models(called ‘Topic Models’in this paper).In this setting,docu-ments that have a high likelihood of being generated from the query model are assumed to be relevant.For a full comparison of this topic model approach and the original document model approach from section 2,see[11].

In the topic model approach,all available exam-ples for a given topic are used to build a GMM.The assumption here is that di?erent components in the GMM can capture di?erent aspects of the informa-tion need,thus contrasting examples(e.g.day and night shots of city views)are no longer a problem. During training of the model we allowed topic sam-ples to be explained by a background model;this way very common,non distinguishing query samples do not contribute as much to the model parameters. After building the models we can use our normal ranking function(Equation1),only now the roles of query and document are reversed;we have a set of document samples x that need to be explained from query modelωi.

Smoothing with background probabilities as in Equation1is not wise in this case.When we use smoothing,common samples get a high score.This is useful in the standard query likelihood approach (Section2),since these high background scores are independent of the document model under consider-ation;the contribution of the individual document models to scores of common samples,is therefore less important and the in?uence of these samples on the ranking is relatively small.However with the reversed likelihood that we are using here,smoothing means that common document samples get high scores.Ob-viously,this is not document independent and thus documents with a lot of common samples will get high scores and end up at the top of the ranked list. For this reason,we do not smooth the scores for the 6

Topic Models and rank the documents using:

RSV(x D)=1

N

N

j=1

log P(x D j|ωQ),(5)

where x D is the set of N samples from document D andωQ is the model built from the samples from topic https://www.doczj.com/doc/ea8222878.html,ing this approach we obtain a MAP of only.005 and for many topics we retrieve a lot of black frames. Apparently,even without the smoothing,we retrieve mainly shots with common samples.This is not too surprising,since shots with common samples which are easily explained by any model,are often also well explained by a speci?c query model.

In an additional(not submitted)experiment,we calculate the odds rather than the likelihood of the document samples:

RSV(x D)=

N

j=1

log P(x D

j

|ωQ) N

j=1

log P(x D

j

|?ωQ)

= N

j=1

log P(x D

j

|ωQ)

N

j=1

log P(x D

j

)

.

(6)

Using this approach,we get a MAP of.013,signi?-cantly higher than for the document likelihood rank-ing discussed above,but lower than the original query likelihood ranking.Perhaps,we still have a back-ground in?uence and are now confronted with a pref-erence for uncommon documents.In post workshop experiments,we found that indeed it is important to balance the in?uence of common and uncommon shots[11].In those experiments,we use the likelihood ratio of Equation6,but we smooth the numerator to balance the in?uence of common and uncommon https://www.doczj.com/doc/ea8222878.html,ing this smoothed version of the likelihood ratio,we get a MAP of.033.We have to admit that these new experiments are based on the COVguard version of the training,but even then the score with-out smoothing is much lower(.015).

6Feature Extraction

In a way,feature extraction is the same as retrieval. There is a more or less coherent set of examples(an-notated images)for a speci?c information need(fea-ture to be detected).Thus,it is possible to use the

techniques developed for search on the feature extrac-tion task.The results could be regarded as a baseline for systems that put more e?ort into building detec-tors for speci?c features.

Starting from the results of the collaborative anno-tation e?ort,we construct sets of examples for each speci?c feature,by grouping labels.For example ev-erything annotated as either building or house is used in the example set for the building feature.The set of examples is then converted into feature vectors using the usual procedure(computing DCTs from8x8pixel blocks).From each set of samples,we take a random subset6and use that as the set of samples to use our search techniques on.We used the sample likeli-hood approach(See Section2)and the reversed like-lihood approach based on feature models both with and without using the background probabilities dur-ing training(Section5.2).For some features some of the approaches got results above median,but overall the results are disappointing.7Possible reasons for this are the high diversity in the set of annotated ex-amples for a given feature and again the in?uence of the background probabilities(cf.Section5.2).Fur-ther experiments with odds rather then likelihoods and more carefully selected examples are needed to test whether feature extraction as search is in princi-ple a reasonable option.

7Interactive Experiments

The interactive experiments are built on results from the automatic models as described in Section2.3. Since computing the associative matrix is computa-tionally very intensive,we computed the likelihood using a random subset of100image samples8.Based on experiments on the TREC2002video collection on which we simulated user feedback using the as-sessments[1],we identi?ed the following four exper-6We take at most10,000samples per feature,to keep ev-erything tractable.For sets with fewer than10,000annotated samples,all available samples are used.

7Even a random system scores above median on some top-ics.

8A small experiment indicated that using a subset of100 samples only,already gives a ranking similar to the one ob-tained by using the full set of samples.

7

iments:

1.Randomised The user gets random key frames

on the screen;

2.Text-Only The next screen of key frames is

only based on the textual query,not on the user’s feedback;

3.Feedback The next screen of key frames is

based on the user’s feedback using the associa-tive matrix based on the mixture models;

4.Feedback-trained The next screen of key

frames is based on the user’s feedback using an associative matrix that was trained on the user feedback gathered by experiments1to3.

Only systems3and4actually used the feedback;the other two systems recorded the feedback for the re-sulting ranked list to make use of the users’notion of relevance,but ignored it when updating the screen. Systems2–4started out with textual query,which was automatically taken from the topic descriptions, thus emulating the realistic situation when the(inex-perienced)user copies the topic description into the query?eld.For the same topic both systems started with the same set of images.

The same user interface was used for all systems. The screen contained twelve scaled-down images(3 rows by4),which could be magni?ed to their real size by hovering mouse pointer over an icon.Above each image,the user could check a box to indicate its relevance to the topic.The topic description was available to the user at any time,and could be re-moved from the screen to save space for key frames. To support the users in their action,recent positive examples were displayed at the side of the screen, even when the feedback was not used by the system for the display update.

For Systems1–3there were two groups of three subjects performing15minute search sessions for each topic,with3×3Latin square experiment de-sign.The supplemental experiment with System4 was performed by one person.The ranked lists for the submission to TREC were produced by taking the images that were selected by the user and con-catenating them with the ranking produced by the model at the last iteration step.All systems used the

collected relevance feedback to?ll up the result list up to the allowed1000shots.

Table2contains in column2MAP achieved with each method after at most15minutes of interaction9. It does not come as a surprise that the prior informa-tion from speech transcripts and text queries from the topic descriptions,in combination with user’s notion of similarity,has great impact on the retrieval quality (System2),further improved by the relevance feed-back based on visual contents of the key frames(in Systems3and4).Remarkably low value for the Ran-domised system indicates,that for a large collection such display update strategy is not practical.The users got to see very little relevant key frames on the screen,and in almost half of the cases the system was unable to produce any one.

Column“Relevant found by users”of Table2 shows the proportion of relevant shots identi?ed by the users during the search,from all relevant shots that occurred in the submitted results.By its de?-nition,the MAP measure is sensitive to the number relevant shots put on top of the ranked list.The dif-ference in MAP between Systems3,4and System2is substantial,but still it hides the fact that the users of the systems with feedback identi?ed49%and60%of all detected relevant shots,whereas for the text-only system this number is about38%.Preliminary exper-iments with training the associative matrix(System 4)indicate that the relevance information obtained from the user is valuable and should be used to com-plement existing techniques for feature extraction.

Table2:Statistics of interactive runs

type by users with NIST Relev.

Randomised(1)0.026 5.79%55.00%31.25% Text only(2)0.21437.83%85.02%51.91% Feedback(3)0.24549.18%78.74%48.98% Trained(4)0.24060.65%64.03%32.07%

9For some topics the system returned no relevant shots which lead to a higher MAP reported in the TREC summary table.

8

Next to “Relevant found by users”are shown the agreement between the users and the ground truth,and the percentage of missed relevant shots.From the numbers we suspect that the user tends to give his/her relevance judgements relative to other images present on the screen:In the Randomised system the user clicked larger proportion of irrelevant key frames,than in other cases.Conversely,when more relevant frames are displayed,the user missed a larger proportion of them than when the screen contained arbitrary key frames (see in Table 2column “Missed relevant”,which shows proportion of key frames of relevant shots,that have not been marked by the users as relevant).Partially the relevant documents are not recognised as such due to the fact that the user saw single frames representing a shot which may not have contained the relevant objects,and not the video shots themselves.This is an indication that there is a need for a better presentation of a shot to the user.

Figure 3shows the recall-precision graphs of sys-tems 1–4.On most recall levels,the feedback run is better than the text run.The feedback run on the trained matrix showed slightly worse performance than the feedback run on the visual feature matrix,but at higher recall levels there is a noticeable advan-

tage.

Figure 3:Precision at various recall levels for inter-active runs.

In the questionnaires that the users ?lled before and after the search sessions,the users merely pre-ferred to make many fast iterations to waiting be-tween the search steps,regardless the fact that a ses-sion never exceeded 15minutes.The average number of iteration steps per search was 65,with the max-imum of 150.Thus,an algorithm that quickly pro-duces the next set of examples,is desired.At the same time,in our small user study we found that the users did not like the Randomised system be-cause of the lack of good examples on the screen,and,conversely,liked when the next screen seemed to be the consequence of their feedback,giving the user the feeling of being in control of the process.Thus,when choosing an algorithm for display update,one should keep a trade o?between speed and quality of that.

8Conclusions

This paper presented the models used and exper-iments carried out for the TRECVID 2003work-shop.We focused on combining information on dif-ferent levels.We combined information from di?erent sources and modalities,information from di?erent vi-sual examples and human and model based informa-tion.

We extended our generative probabilistic models to include temporal information and found this im-proves the https://www.doczj.com/doc/ea8222878.html,bining these results with re-sults from a ASR run gives another improvement.Whenever both text results (from ASR language models)and visual results (from GMM models)do something useful,a combination gives even better re-sults.

Manually selecting good visual examples and useful models for a given topic gave the best results among the visual runs.The selection of (multiple)good ex-amples and their combination are the main cause for this success.

Intuitively,building a model from all (or some)vi-sual topic examples and ranking the documents by their probability of being generated from such a topic model,seems at least as good an approach as the re-versed process (trying to explain query samples from document models).In practise it turns out that in

9

fact this topic model approach works better,provided that smoothing is used(See also[11]).

The interactive search results are obviously far bet-ter,than the manual ones.Also here we noticed that a combination of textual and visual information per-formed better than text alone.The user action re-mains an indispensable component of an information retrieval system.

References

[1]L.Boldareva, D.Hiemstra,and W.Jonker.

Relevance feedback in probabilistic multime-dia retrieval.In DELOS Workshop on Mul-timedia Contents in Digital Libraries,2003.

http://www.music.tuc.gr/MDL/.

[2]A.P.de Vries,T.Westerveld,and T.Ianeva.

Combining multiple representations on the TRECVID search task.In International Confer-ence on Acoustics,Speech,and Signal Processing (ICASSP2004),2004.to appear.

[3]A.Dempster,https://www.doczj.com/doc/ea8222878.html,ird,and D.Rubin.Maximum

likelihood from incomplete data via the em algo-rithm.Journal of the Royal Statistical Society, series B,39(1):1–38,1977.

[4]R.Fagin.Fuzzy queries in multimedia database

systems.In ACM Symposium on Principles of Database Systems(PODS),pages1–10,1998.

[5]J.Gauvain,https://www.doczj.com/doc/ea8222878.html,mel,and G.Adda.The LIMSI

broadcast news transcription system.Speech Communication,37(1–2):89–108,2002.

[6]https://www.doczj.com/doc/ea8222878.html,ing language models for infor-

mation retrieval.PhD thesis,Centre for Telem-atics and Information Technology,University of Twente,2001.

[7]T.Ianeva,A.P.de Vries,and T.Westerveld.

A dynamic probabilistic retrieval model.In

IEEE International Conference on Multimedia and Expo(ICME),2004.to appear.

[8]T.I.Ianeva, A.P.de Vries,and H.R¨o hrig.

Detecting cartoons:a case study in automatic

video-genre classi?cation.In2003IEEE In-ternational Conference on Multimeda&Expo, 2003.

[9]J.M.Ponte and W. B.Croft.A language

modeling approach to information retrieval.In Proceedings of the21st ACM Conference on Research and Development in Information Re-trieval(SIGIR’98),pages275–281,1998. [10]N.Vasconcelos.Bayesian Models for Visual In-

formation Retrieval.PhD thesis,Massachusetts Institut of Technology,2000.

[11]T.Westerveld and A.P.de Vries.Multimedia

retrieval using multiple examples.Technical Re-port INS-E0403,CWI,Amsterdam,The Nether-lands,March2004.

[12]T.Westerveld,A.P.de Vries,and A.van Bal-

legooij.CWI at the TREC-2002video track.

In E.M.Voorhees and D.K.Harman,edi-tors,The Eleventh Text REtrieval Conference (TREC-2002),2003.

[13]T.Westerveld,A.P.de Vries,A.van Ballegooij,

F.M.

G.de Jong,and D.Hiemstra.A proba-

bilistic multimedia retrieval model and its eval-uation.EURASIP Journal on Applied Signal Processing,2003(2):186–198,2003.special issue on Unstructured Information Management from Multimedia Data Sources.

10

尊重的素材

尊重的素材(为人处世) 思路 人与人之间只有互相尊重才能友好相处 要让别人尊重自己,首先自己得尊重自己 尊重能减少人与人之间的摩擦 尊重需要理解和宽容 尊重也应坚持原则 尊重能促进社会成员之间的沟通 尊重别人的劳动成果 尊重能巩固友谊 尊重会使合作更愉快 和谐的社会需要彼此间的尊重 名言 施与人,但不要使对方有受施的感觉。帮助人,但给予对方最高的尊重。这是助人的艺术,也是仁爱的情操。—刘墉 卑己而尊人是不好的,尊己而卑人也是不好的。———徐特立 知道他自己尊严的人,他就完全不能尊重别人的尊严。———席勒 真正伟大的人是不压制人也不受人压制的。———纪伯伦 草木是靠着上天的雨露滋长的,但是它们也敢仰望穹苍。———莎士比亚 尊重别人,才能让人尊敬。———笛卡尔 谁自尊,谁就会得到尊重。———巴尔扎克 人应尊敬他自己,并应自视能配得上最高尚的东西。———黑格尔 对人不尊敬,首先就是对自己的不尊敬。———惠特曼

每当人们不尊重我们时,我们总被深深激怒。然而在内心深处,没有一个人十分尊重自己。———马克·吐温 忍辱偷生的人,绝不会受人尊重。———高乃依 敬人者,人恒敬之。———《孟子》 人必自敬,然后人敬之;人必自侮,然后人侮之。———扬雄 不知自爱反是自害。———郑善夫 仁者必敬人。———《荀子》 君子贵人而贱己,先人而后己。———《礼记》 尊严是人类灵魂中不可糟蹋的东西。———古斯曼 对一个人的尊重要达到他所希望的程度,那是困难的。———沃夫格纳 经典素材 1元和200元 (尊重劳动成果) 香港大富豪李嘉诚在下车时不慎将一元钱掉入车下,随即屈身去拾,旁边一服务生看到了,上前帮他拾起了一元钱。李嘉诚收起一元钱后,给了服务生200元酬金。 这里面其实包含了钱以外的价值观念。李嘉诚虽然巨富,但生活俭朴,从不挥霍浪费。他深知亿万资产,都是一元一元挣来的。钱币在他眼中已抽象为一种劳动,而劳动已成为他最重要的生存方式,他的所有财富,都是靠每天20小时以上的劳动堆积起来的。200元酬金,实际上是对劳动的尊重和报答,是不能用金钱衡量的。 富兰克林借书解怨 (尊重别人赢得朋友)

交互式多模型算法仿真与分析

硕037班 刘文3110038020 2011/4/20交互式多模型仿真与分析IMM算法与GBP算法的比较,算法实现和运动目标跟踪仿真,IMM算法的特性分析 多源信息融合实验报告

交互式多模型仿真与分析 一、 算法综述 由于混合系统的结构是未知的或者随机突变的,在估计系统状态参数的同时还需要对系统的运动模式进行辨识,所以不可能通过建立起一个固定的模型对系统状态进行效果较好的估计。针对这一问题,多模型的估计方法提出通过一个模型集{}(),1,2,,j M m j r == 中不同模型的切换来匹配不同目标的运动或者同一目标不同阶段的运动,达到运动模式的实时辨识的效果。 目前主要的多模型方法包括一阶广义贝叶斯方法(BGP1),二阶广义贝叶斯方法(GPB2)以及交互式多模型方法等(IMM )。这些多模型方法的共同点是基于马尔科夫链对各自的模型集进行切换或者融合,他们的主要设计流程如下图: M={m1,m2,...mk} K 时刻输入 值的形式 图一 多模型设计方法 其中,滤波器的重初始化方式是区分不同多模型算法的主要标准。由于多模型方法都是基于一个马尔科夫链来切换与模型的,对于元素为r 的模型集{}(),1,2,,j M m j r == ,从0时刻到k 时刻,其可能的模型切换轨迹为 120,12{,,}k i i i k trace k M m m m = ,其中k i k m 表示K-1到K 时刻,模型切换到第k i 个, k i 可取1,2,,r ,即0,k trace M 总共有k r 种可能。再令1 2 1 ,,,,k k i i i i μ+ 为K+1时刻经由轨迹0,k trace M 输入到第1k i +个模型滤波器的加权系数,则输入可以表示为 0,11 2 1 12|,,,,|,,,???k k trace k k k i M k k i i i i k k i i i x x μ++=?∑ 可见轨迹0,k trace M 的复杂度直接影响到算法计算量和存储量。虽然全轨迹的

五种大数据压缩算法

?哈弗曼编码 A method for the construction of minimum-re-dundancy codes, 耿国华1数据结构1北京:高等教育出版社,2005:182—190 严蔚敏,吴伟民.数据结构(C语言版)[M].北京:清华大学出版社,1997. 冯桂,林其伟,陈东华.信息论与编码技术[M].北京:清华大学出版社,2007. 刘大有,唐海鹰,孙舒杨,等.数据结构[M].北京:高等教育出版社,2001 ?压缩实现 速度要求 为了让它(huffman.cpp)快速运行,同时不使用任何动态库,比如STL或者MFC。它压缩1M数据少于100ms(P3处理器,主频1G)。 压缩过程 压缩代码非常简单,首先用ASCII值初始化511个哈夫曼节点: CHuffmanNode nodes[511]; for(int nCount = 0; nCount < 256; nCount++) nodes[nCount].byAscii = nCount; 其次,计算在输入缓冲区数据中,每个ASCII码出现的频率: for(nCount = 0; nCount < nSrcLen; nCount++) nodes[pSrc[nCount]].nFrequency++; 然后,根据频率进行排序: qsort(nodes, 256, sizeof(CHuffmanNode), frequencyCompare); 哈夫曼树,获取每个ASCII码对应的位序列: int nNodeCount = GetHuffmanTree(nodes); 构造哈夫曼树 构造哈夫曼树非常简单,将所有的节点放到一个队列中,用一个节点替换两个频率最低的节点,新节点的频率就是这两个节点的频率之和。这样,新节点就是两个被替换节点的父

LZ77压缩算法实验报告

LZ77压缩算法实验报告 一、实验内容 使用C++编程实现LZ77压缩算法的实现。 二、实验目的 用LZ77实现文件的压缩。 三、实验环境 1、软件环境:Visual C++ 6.0 2、编程语言:C++ 四、实验原理 LZ77 算法在某种意义上又可以称为“滑动窗口压缩”,这是由于该算法将一个虚拟的,可以跟随压缩进程滑动的窗口作为术语字典,要压缩的字符串如果在该窗口中出现,则输出其出现位置和长度。使用固定大小窗口进行术语匹配,而不是在所有已经编码的信息中匹配,是因为匹配算法的时间消耗往往很多,必须限制字典的大小才能保证算法的效率;随着压缩的进程滑动字典窗口,使其中总包含最近编码过的信息,是因为对大多数信息而言,要编码的字符串往往在最近的上下文中更容易找到匹配串。 五、LZ77算法的基本流程 1、从当前压缩位置开始,考察未编码的数据,并试图在滑动窗口中找出最长的匹 配字符串,如果找到,则进行步骤2,否则进行步骤3。 2、输出三元符号组( off, len, c )。其中off 为窗口中匹

配字符串相对窗口边 界的偏移,len 为可匹配的长度,c 为下一个字符。然后将窗口向后滑动len + 1 个字符,继续步骤1。 3、输出三元符号组( 0, 0, c )。其中c 为下一个字符。然后将窗口向后滑动 len + 1 个字符,继续步骤1。 六、源程序 /********************************************************************* * * Project description: * Lz77 compression/decompression algorithm. * *********************************************************************/ #include #include #include #include #define OFFSET_CODING_LENGTH (10) #define MAX_WND_SIZE 1024 //#define MAX_WND_SIZE (1<

网店美工视觉设计实战教程(全彩微课版)-48481-教学大纲

《网店美工视觉设计实战教程(全彩微课版)》 教学大纲 一、课程信息 课程名称:网店美工:店铺装修+图片美化+页面设计+运营推广(全彩微课版) 课程类别:素质选修课/专业基础课 课程性质:选修/必修 计划学时:21 计划学分:2 先修课程:无 选用教材:《网店美工视觉设计实战教程(全彩微课版)》,何晓琴编著,2018年;人民邮电出版社出版教材; 适用专业:本书可作为有志于或者正在从事淘宝美工相关职业的人员学习和参考,也可作为高等院校电子商务相关课程的教材。 课程负责人: 二、课程简介 随着网店的迅速普及和全民化,衍生了“淘宝美工”这个针对网店页面视觉设计的新兴行业。本书从淘宝美工的角度出发,为淘宝卖家提供全面、实用、快速的店铺视觉设计与装修指导。主要包括网店美工基础、图片调色、图片修饰、店铺首页核心模块设计、详情页视觉设计、页面装修、视觉营销推广图制作等,最后针对无线端进行首页、详情页视觉的设计与装修。本书内容层层深入,并通过丰富的实例为读者全方面介绍淘宝美工在日常工作中所需的知识和技能,有效地引导读者进行淘宝店铺装修的学习。 本课程主要对淘宝美工的设计基础和方法进行详细介绍,通过学习该课程,使学生了解网店美工的基本要求,以及掌握网店的设计与制作。 三、课程教学要求

体描述。“关联程度”栏中字母表示二者关联程度。关联程度按高关联、中关联、低关联三档分别表示为“H”“M”或“L”。“课程教学要求”及“关联程度”中的空白栏表示该课程与所对应的专业毕业要求条目不相关。 四、课程教学内容

五、考核要求及成绩评定 注:此表中内容为该课程的全部考核方式及其相关信息。 六、学生学习建议 (一)学习方法建议 1. 理论配合实战训练进行学习,提高学生的实战动手能力; 2. 在条件允许的情况下,可以申请一个网店,进行深入学习; 3. 提高学生的是设计感和审美能力; (二)学生课外阅读参考资料 《网店美工:店铺装修+图片美化+页面设计+运营推广(全彩微课版)》,何晓琴编著,2018年,人民邮电出版社合作出版教材

LZSS压缩算法实验报告

实验名称:LZSS压缩算法实验报告 一、实验内容 使用Visual 6..0 C++编程实现LZ77压缩算法。 二、实验目的 用LZSS实现文件的压缩。 三、实验原理 LZSS压缩算法是词典编码无损压缩技术的一种。LZSS压缩算法的字典模型使用了自适应的方式,也就是说,将已经编码过的信息作为字典, 四、实验环境 1、软件环境:Visual C++ 6.0 2、编程语言:C++ 五、实验代码 #include #include #include #include /* size of ring buffer */ #define N 4096 /* index for root of binary search trees */ #define NIL N /* upper limit for g_match_len. Changed from 18 to 16 for binary compatability with Microsoft COMPRESS.EXE and EXPAND.EXE #define F 18 */ #define F 16 /* encode string into position and length if match_length is greater than this: */ #define THRESHOLD 2 /* these assume little-endian CPU like Intel x86

-- need byte-swap function for big endian CPU */ #define READ_LE32(X) *(uint32_t *)(X) #define WRITE_LE32(X,Y) *(uint32_t *)(X) = (Y) /* this assumes sizeof(long)==4 */ typedef unsigned long uint32_t; /* text (input) size counter, code (output) size counter, and counter for reporting progress every 1K bytes */ static unsigned long g_text_size, g_code_size, g_print_count; /* ring buffer of size N, with extra F-1 bytes to facilitate string comparison */ static unsigned char g_ring_buffer[N + F - 1]; /* position and length of longest match; set by insert_node() */ static unsigned g_match_pos, g_match_len; /* left & right children & parent -- these constitute binary search tree */ static unsigned g_left_child[N + 1], g_right_child[N + 257], g_parent[N + 1]; /* input & output files */ static FILE *g_infile, *g_outfile; /***************************************************************************** initialize trees *****************************************************************************/ static void init_tree(void) { unsigned i; /* For i = 0 to N - 1, g_right_child[i] and g_left_child[i] will be the right and left children of node i. These nodes need not be initialized. Also, g_parent[i] is the parent of node i. These are initialized to NIL (= N), which stands for 'not used.' For i = 0 to 255, g_right_child[N + i + 1] is the root of the tree for strings that begin with character i. These are initialized to NIL. Note there are 256 trees. */ for(i = N + 1; i <= N + 256; i++) g_right_child[i] = NIL; for(i = 0; i < N; i++) g_parent[i] = NIL; } /***************************************************************************** Inserts string of length F, g_ring_buffer[r..r+F-1], into one of the trees (g_ring_buffer[r]'th tree) and returns the longest-match position and length via the global variables g_match_pos and g_match_len. If g_match_len = F, then removes the old node in favor of the new one, because the old one will be deleted sooner.

尊重议论文

谈如何尊重人尊重他人,我们赢得友谊;尊重他人,我们收获真诚;尊重他人,我们自己也 获得尊重;相互尊重,我们的社会才会更加和谐. ——题记 尊重是对他人的肯定,是对对方的友好与宽容。它是友谊的润滑剂,它是和谐的调节器, 它是我们须臾不可脱离的清新空气。“主席敬酒,岂敢岂敢?”“尊老敬贤,应该应该!”共和 国领袖对自己老师虚怀若谷,这是尊重;面对许光平女士,共和国总理大方的叫了一 声“婶婶”,这种和蔼可亲也是尊重。 尊重不仅会让人心情愉悦呼吸平顺,还可以改变陌生或尖锐的关系,廉颇和蔺相如便是 如此。将相和故事千古流芳:廉颇对蔺相如不满,处处使难,但蔺相如心怀大局,对廉颇相 当的尊重,最后也赢得了廉颇的真诚心,两人结为好友,共辅赵王,令强秦拿赵国一点办法 也没有。蔺相如与廉颇的互相尊重,令得将相和的故事千百年令无数后人膜拜。 现在,给大家举几个例子。在美国,一个颇有名望的富商在散步 时,遇到一个瘦弱的摆地摊卖旧书的年轻人,他缩着身子在寒风中啃着发霉的面包。富 商怜悯地将8美元塞到年轻人手中,头也不回地走了。没走多远,富商忽又返回,从地摊上 捡了两本旧书,并说:“对不起,我忘了取书。其实,您和我一样也是商人!”两年后,富商 应邀参加一个慈善募捐会时,一位年轻书商紧握着他的手,感激地说:“我一直以为我这一生 只有摆摊乞讨的命运,直到你亲口对我说,我和你一样都是商人,这才使我树立了自尊和自 信,从而创造了今天的业绩??”不难想像,没有那一 句尊重鼓励的话,这位富商当初即使给年轻人再多钱,年轻人也断不会出现人生的巨变, 这就是尊重的力量啊 可见尊重的量是多吗大。大家是不是觉得一个故事不精彩,不够明确尊重的力量,那再 来看下一个故事吧! 一家国际知名的大企业,在中国进行招聘,招聘的职位是该公司在中国的首席代表。经 过了异常激烈的竞争后,有五名年轻人,从几千名应聘者中脱颖而出。最后的胜出者,将是 这五个人中的一位。最后的考试是一场面试,考官们都 作文话题素材之为人处世篇:尊重 思路 人与人之间只有互相尊重才能友好相处 要让别人尊重自己,首先自己得尊重自己 尊重能减少人与人之间的摩擦 尊重需要理解和宽容 尊重也应坚持原则 尊重能促进社会成员之间的沟通 尊重别人的劳动成果 尊重能巩固友谊 尊重会使合作更愉快 和谐的社会需要彼此间的尊重 名言 施与人,但不要使对方有受施的感觉。帮助人,但给予对方最高的尊重。这是助人的艺 术,也是仁爱的情操。———刘墉 卑己而尊人是不好的,尊己而卑人也是不好的。———徐特立 知道他自己尊严的人,他就完全不能尊重别人的尊严。———席勒 真正伟大的人是不压制人也不受人压制的。———纪伯伦 草木是靠着上天的雨露滋长的,但是它们也敢仰望穹苍。———莎士比亚

多媒体数据压缩实验报告

多媒体数据压缩实验报告 篇一:多媒体实验报告_文件压缩 课程设计报告 实验题目:文件压缩程序 姓名:指导教师:学院:计算机学院专业:计算机科学与技术学号: 提交报告时间:20年月日 四川大学 一,需求分析: 有两种形式的重复存在于计算机数据中,文件压缩程序就是对这两种重复进行了压 缩。 一种是短语形式的重复,即三个字节以上的重复,对于这种重复,压缩程序用两个数字:1.重复位置距当前压缩位置的距离;2.重复的长度,来表示这个重复,假设这两个数字各占一个字节,于是数据便得到了压缩。 第二种重复为单字节的重复,一个字节只有256种可能的取值,所以这种重复是必然的。给 256 种字节取值重新编码,使出现较多的字节使用较短的编码,出现较少的字节使用较长的编码,这样一来,变短的字节相对于变长的字节更多,文件的总长度就会减少,并且,字节使用比例越不均

匀,压缩比例就越大。 编码式压缩必须在短语式压缩之后进行,因为编码式压缩后,原先八位二进制值的字节就被破坏了,这样文件中短语式重复的倾向也会被破坏(除非先进行解码)。另外,短语式压缩后的结果:那些剩下的未被匹配的单、双字节和得到匹配的距离、长度值仍然具有取值分布不均匀性,因此,两种压缩方式的顺序不能变。 本程序设计只做了编码式压缩,采用Huffman编码进行压缩和解压缩。Huffman编码是一种可变长编码方式,是二叉树的一种特殊转化形式。编码的原理是:将使用次数多的代码转换成长度较短的代码,而使用次数少的可以使用较长的编码,并且保持编码的唯一可解性。根据 ascii 码文件中各 ascii 字符出现的频率情况创建 Huffman 树,再将各字符对应的哈夫曼编码写入文件中。同时,亦可根据对应的哈夫曼树,将哈夫曼编码文件解压成字符文件. 一、概要设计: 压缩过程的实现: 压缩过程的流程是清晰而简单的: 1. 创建 Huffman 树 2. 打开需压缩文件 3. 将需压缩文件中的每个 ascii 码对应的 huffman 编码按 bit 单位输出生成压缩文件压缩结束。

数据快速压缩算法的C语言实现

价值工程 置,是一项十分有意义的工作。另外恶意代码的检测和分析是一个长期的过程,应对其新的特征和发展趋势作进一步研究,建立完善的分析库。 参考文献: [1]CNCERT/CC.https://www.doczj.com/doc/ea8222878.html,/publish/main/46/index.html. [2]LO R,LEVITTK,OL SSONN R.MFC:a malicious code filter [J].Computer and Security,1995,14(6):541-566. [3]KA SP ER SKY L.The evolution of technologies used to detect malicious code [M].Moscow:Kaspersky Lap,2007. [4]LC Briand,J Feng,Y Labiche.Experimenting with Genetic Algorithms and Coupling Measures to devise optimal integration test orders.Software Engineering with Computational Intelligence,Kluwer,2003. [5]Steven A.Hofmeyr,Stephanie Forrest,Anil Somayaji.Intrusion Detection using Sequences of System calls.Journal of Computer Security Vol,Jun.1998. [6]李华,刘智,覃征,张小松.基于行为分析和特征码的恶意代码检测技术[J].计算机应用研究,2011,28(3):1127-1129. [7]刘威,刘鑫,杜振华.2010年我国恶意代码新特点的研究.第26次全国计算机安全学术交流会论文集,2011,(09). [8]IDIKA N,MATHUR A P.A Survey of Malware Detection Techniques [R].Tehnical Report,Department of Computer Science,Purdue University,2007. 0引言 现有的压缩算法有很多种,但是都存在一定的局限性,比如:LZw [1]。主要是针对数据量较大的图像之类的进行压缩,不适合对简单报文的压缩。比如说,传输中有长度限制的数据,而实际传输的数据大于限制传输的数据长度,总体数据长度在100字节左右,此时使用一些流行算法反而达不到压缩的目的,甚至增大数据的长度。本文假设该批数据为纯数字数据,实现压缩并解压缩算法。 1数据压缩概念 数据压缩是指在不丢失信息的前提下,缩减数据量以减少存储空间,提高其传输、存储和处理效率的一种技术方法。或按照一定的算法对数据进行重新组织,减少数据的冗余和存储的空间。常用的压缩方式[2,3]有统计编码、预测编码、变换编码和混合编码等。统计编码包含哈夫曼编码、算术编码、游程编码、字典编码等。 2常见几种压缩算法的比较2.1霍夫曼编码压缩[4]:也是一种常用的压缩方法。其基本原理是频繁使用的数据用较短的代码代替,很少使用 的数据用较长的代码代替,每个数据的代码各不相同。这些代码都是二进制码,且码的长度是可变的。 2.2LZW 压缩方法[5,6]:LZW 压缩技术比其它大多数压缩技术都复杂,压缩效率也较高。其基本原理是把每一个第一次出现的字符串用一个数值来编码,在还原程序中再将这个数值还成原来的字符串,如用数值0x100代替字符串ccddeee"这样每当出现该字符串时,都用0x100代替,起到了压缩的作用。 3简单报文数据压缩算法及实现 3.1算法的基本思想数字0-9在内存中占用的位最 大为4bit , 而一个字节有8个bit ,显然一个字节至少可以保存两个数字,而一个字符型的数字在内存中是占用一个字节的,那么就可以实现2:1的压缩,压缩算法有几种,比如,一个自己的高四位保存一个数字,低四位保存另外一个数字,或者,一组数字字符可以转换为一个n 字节的数值。N 为C 语言某种数值类型的所占的字节长度,本文讨论后一种算法的实现。 3.2算法步骤 ①确定一种C 语言的数值类型。 —————————————————————— —作者简介:安建梅(1981-),女,山西忻州人,助理实验室,研究方 向为软件开发与软交换技术;季松华(1978-),男,江苏 南通人,高级软件工程师,研究方向为软件开发。 数据快速压缩算法的研究以及C 语言实现 The Study of Data Compression and Encryption Algorithm and Realization with C Language 安建梅①AN Jian-mei ;季松华②JI Song-hua (①重庆文理学院软件工程学院,永川402160;②中信网络科技股份有限公司,重庆400000)(①The Software Engineering Institute of Chongqing University of Arts and Sciences ,Chongqing 402160,China ; ②CITIC Application Service Provider Co.,Ltd.,Chongqing 400000,China ) 摘要:压缩算法有很多种,但是对需要压缩到一定长度的简单的报文进行处理时,现有的算法不仅达不到目的,并且变得复杂, 本文针对目前一些企业的需要,实现了对简单报文的压缩加密,此算法不仅可以快速对几十上百位的数据进行压缩,而且通过不断 的优化,解决了由于各种情况引发的解密错误,在解密的过程中不会出现任何差错。 Abstract:Although,there are many kinds of compression algorithm,the need for encryption and compression of a length of a simple message processing,the existing algorithm is not only counterproductive,but also complicated.To some enterprises need,this paper realizes the simple message of compression and encryption.This algorithm can not only fast for tens of hundreds of data compression,but also,solve the various conditions triggered by decryption errors through continuous optimization;therefore,the decryption process does not appear in any error. 关键词:压缩;解压缩;数字字符;简单报文Key words:compression ;decompression ;encryption ;message 中图分类号:TP39文献标识码:A 文章编号:1006-4311(2012)35-0192-02 ·192·

尊重他人的写作素材

尊重他人的写作素材 导读:——学生最需要礼貌 著名数学家陈景润回厦门大学参加 60 周年校庆,向欢迎的人们说的第一句话是:“我非常高兴回到母校,我常常怀念老师。”被人誉为“懂得人的价值”的著名经济学家、厦门大学老校长王亚南,曾经给予陈景润无微不至的关心和帮助。陈景润重返母校,首先拜访这位老校长。校庆的第三天,陈景润又出现在向“哥德巴赫猜想”进军的启蒙老师李文清教授家中,陈景润非常尊重和感激他。他还把最新发表的数学论文敬送李教授审阅,并在论文扉页上工工整整写了以下的字:“非常感谢老师的长期指导和培养——您的学生陈景润。”陈景润还拜访了方德植教授,方教授望着成就斐然而有礼貌的学生,心里暖暖的。 ——最需要尊重的人是老师 周恩来少年时在沈阳东关模范学校读书期间 , 受到进步教师高盘之的较大影响。他常用的笔名“翔宇”就是高先生为他取的。周恩来参加革命后不忘师恩 , 曾在延安答外国记者问时说:“少年时代我在沈阳读书 , 得山东高盘之先生教诲与鼓励 , 对我是个很大的 促进。” 停奏抗议的反思 ——没有礼仪就没有尊重 孔祥东是著名的钢琴演奏家。 1998 年 6 月 6 日晚,他在汕头

举办个人钢琴独奏音乐会。演出之前,节目主持人再三强调,场内观众不要随意走动,关掉 BP 机、手提电话。然而,演出的过程中,这种令人遗憾的场面却屡屡发生:场内观众随意走动, BP 机、手提电话响声不绝,致使孔祥东情绪大受干扰。这种情况,在演奏舒曼作品时更甚。孔祥东只好停止演奏,静等剧场安静。然而,观众还误以为孔祥东是在渴望掌声,便报以雷鸣般的掌声。这件事,令孔祥东啼笑皆非。演出结束后,孔祥东说:有个 BP 机至少响了 8 次,观众在第一排来回走动,所以他只得以停奏抗议。 “礼遇”的动力 ——尊重可以让人奋发 日本的东芝公司是一家著名的大型企业,创业已经有 90 多年的历史,拥有员工 8 万多人。不过,东芝公司也曾一度陷入困境,土光敏夫就是在这个时候出任董事长的。他决心振兴企业,而秘密武器之一就是“礼遇”部属。身为偌大一个公司的董事长,他毫无架子,经常不带秘书,一个人步行到工厂车间与工人聊天,听取他们的意见。更妙的是,他常常提着酒瓶去慰劳职工,与他们共饮。对此,员工们开始都感到很吃惊,不知所措。渐渐地,员工们都愿意和他亲近,他赢得了公司上下的好评。他们认为,土光董事长和蔼可亲,有人情味,我们更应该努力,竭力效忠。因此,土光上任不久,公司的效益就大力提高,两年内就把亏损严重、日暮途穷的公司重新支撑起来,使东芝成为日本最优秀的公司之一。可见,礼,不仅是调节领导层之间关

压缩编码算法设计与实现实验报告

压缩编码算法设计与实现实验报告 一、实验目的:用C语言或C++编写一个实现Huffman编码的程序,理解对数据进行无损压缩的原理。 二、实验内容:设计一个有n个叶节点的huffman树,从终端读入n个叶节 点的权值。设计出huffman编码的压缩算法,完成对n个节点的编码,并写出程序予以实现。 三、实验步骤及原理: 1、原理:Huffman算法的描述 (1)初始化,根据符号权重的大小按由大到小顺序对符号进行排序。 (2)把权重最小的两个符号组成一个节点, (3)重复步骤2,得到节点P2,P3,P4……,形成一棵树。 (4)从根节点开始顺着树枝到每个叶子分别写出每个符号的代码 2、实验步骤: 根据算法原理,设计程序流程,完成代码设计。 首先,用户先输入一个数n,以实现n个叶节点的Huffman 树; 之后,输入n个权值w[1]~w[n],注意是unsigned int型数值; 然后,建立Huffman 树; 最后,完成Huffman编码。 四、实验代码:#include #include #include #define MAX 0xFFFFFFFF typedef struct / /*设计一个结构体,存放权值,左右孩子*// { unsigned int weight; unsigned int parent,lchild,rchild; }HTNode,*HuffmanTree; typedef char** HuffmanCode;

int min(HuffmanTree t,int i) { int j,flag; unsigned int k = MAX; for(j=1;j<=i;j++) if(t[j].parent==0&&t[j].weight s2) { tmp = s1; s1 = s2; s2 = tmp; } } void HuffmanCoding(HuffmanTree &HT,HuffmanCode &HC,int *w,int n,int &wpl) { int m,i,s1,s2,start,j; unsigned int c,f; HuffmanTree p; char *cd; if(n<=1) return; m=2*n-1; HT=(HuffmanTree)malloc((m+1)*sizeof(HTNode)); for(p=HT+1,i=1;i<=n;++i,++p,++w) { (*p).weight=*w; (*p).parent=0; (*p).lchild=0; (*p).rchild=0; }

尊重_议论文素材

尊重_议论文素材 "礼遇"的动力 --尊重可以让人奋发 日本的东芝公司是一家著名的大型企业,创业已经有90 多年的历史,拥有员工8 万多人。不过,东芝公司也曾一度陷入困境,土光敏夫就是在这个时候出任董事长的。他决心振兴企业,而秘密武器之一就是"礼遇"部属。身为偌大一个公司的董事长,他毫无架子,经常不带秘书,一个人步行到工厂车间与工人聊天,听取他们的意见。更妙的是,他常常提着酒瓶去慰劳职工,与他们共饮。对此,员工们开始都感到很吃惊,不知所措。渐渐地,员工们都愿意和他亲近,他赢得了公司上下的好评。他们认为,土光董事长和蔼可亲,有人情味,我们更应该努力,竭力效忠。因此,土光上任不久,公司的效益就大力提高,两年内就把亏损严重、日暮途穷的公司重新支撑起来,使东芝成为日本最优秀的公司之一。可见,礼,不仅是调节领导层之间关系的纽带,也是调节上下级之间关系,甚至和一线工人之间关系的纽带。世界知识产权日 --尊重知识 在2000 年10 月召开的世界知识产权组织第35 届成员国大会上,我国提议将 4 月26 日定为"世界知识产权日"。这个提案经世界知识产权组织成员国大会得到了确定。2001 年4 月26 日成为第一个"世界知识产权日"。这是我国尊重知识的具体表现。 屠格涅夫与乞丐 --尊重比金钱更重要 俄罗斯文豪屠格涅夫一日在镇上散步,路边有一个乞丐伸手向他讨钱。他很想有所施与,从口袋掏钱时才知道没有带钱袋。见乞丐的手伸得高高地等着,屠格涅夫面有愧色,只好握着乞丐的手说:"对不起,我忘了带钱出来。"乞丐笑了,含泪说:"不,我宁愿接受您的握手。" 孙中山尊重护士 --尊重不分社会地位 有一天,孙中山先生病了,住院治疗。当时,孙中山已是大总统、大元帅了。但是,他对医务人员很尊重,对他们讲话很谦逊。平时,无论是早晨或是晚间,每当接到护士送来的药品,他总是微笑着说声"谢谢您",敬诚之意溢于言辞。 1925 年孙中山患肝癌,弥留之际,当一位护理人员为他搬掉炕桌时,孙中山先生安详地望着她,慈祥地说:"谢谢您,您的工作太辛苦了,过后您应该好好休息休息,这阵子您太辛苦了! "听了这话,在场的人都泣不成声。 毛泽东敬酒 --敬老尊贤是一种美德 1959 年6 月25 日,毛泽东回到离别30 多年的故乡韶山后,请韶山老人毛禹珠来吃饭,并特地向他敬酒。毛禹珠老人说:"主席敬酒,岂敢岂敢! "毛泽东接着说:"敬老尊贤,应该应该。" 周恩来不穿拖鞋接待外宾 --衣着整齐体现对人的尊重 周恩来晚年病得很重,由于工作的需要,他还要经常接待外宾。后来,他病得连脚都肿起来了,原先的皮鞋、布鞋都不能穿,他只能穿着拖鞋走路,可是,有些重要的外事活动,他还是坚持参加。他身边的工作人员出于对总理的爱护和关心,对他说:"您就穿着拖鞋接待外

交互式多模型算法卡尔曼滤波仿真

交互式多模型算法卡尔曼滤波仿真 1 模型建立 分别以加速度u=0、1、2代表三个不同的运动模型 状态方程x(k+1)=a*x(k)+b*w(k)+d*u 观察方程z(k)=c*x(k)+v(k) 其中,a=[1 dt;0 1],b=[dt^2/2;dt],d=[dt^2/2;dt],c=[1 0] 2 程序代码 由两个功能函数组成,imm_main用来实现imm 算法,move_model1用来生成仿真数据,初始化运动参数 function imm_main %交互式多模型算法主程序 %初始化有关参数 move_model %调用运动模型初始化及仿真运动状态生成函数 load movedata %调入有关参数初始值(a b d c u position velocity pmeas dt tg q r x_hat p_var) p_tran=[0.8 0.1 0.1;0.2 0.7 0.1;0.1 0.2 0.7];%转移概率 p_pri=[0.1;0.6;0.3];%模型先验概率 n=1:2:5; %提取各模型方差矩阵 k=0; %记录仿真步数 like=[0;0;0];%视然函数 x_hat_hat=zeros(2,3);%三模型运动状态重初始化矩阵 u_=zeros(3,3);%混合概率矩阵 c_=[0;0;0];%三模型概率更新系数 %数据保存有关参数初始化 phat=[];%保存位置估值 vhat=[];%保存速度估值 xhat=[0;0];%融合和运动状态 z=0;%量测偏差(一维位置) pvar=zeros(2,2);%融合后估计方差 for t=0:dt:tg; %dt为为仿真步长;tg为仿真时间长度 k=k+1;%记录仿真步数 ct=0; %三模型概率更新系数 c_max=[0 0 0];%混合概率规范系数 p_var_hat=zeros(2,6);%方差估计重初始化矩阵, %[x_hat_hat p_var_hat]=model_reinitialization(p_tran,p_pri,x_hat,p_var);%调用重初始化函数,进行混合估计,生成三个模型重初始化后的运动状态、方差 %混合概率计算 for i=1:3 u_(i,:)=p_tran(i,:)*p_pri(i); end for i=1:3 c_max=c_max+u_(i,:); end

关于尊重的论点和论据素材

关于尊重的论点和论据素材 关于尊重的论点 1.尊重需要理解和宽容。 2.尊重也应该坚持原则。 3.尊重知识是社会进步的表现。 4.尊重别人就要尊重别人的劳动。 5.尊重人才是社会发展的需要。 6.人与人之间需要相互尊重。 7.只有尊重别人才会受到别人的尊重。 8.尊重能促进人与人之间的沟通。 9.我们应该养成尊重他人的习惯。 10.对人尊重,常会产生意想不到的善果。 关于尊重的名言 1.仁者必敬人。《荀子》 2.忍辱偷生的人决不会受人尊重。高乃依 3.尊重别人的人不应该谈自己。高尔基 4.尊重别人,才能让人尊敬。笛卡尔 5.谁自尊,谁就会得到尊重。巴尔扎克 6.君子贵人而贱己,先人而后己。《礼记》 7.卑己而尊人是不好的,尊己而卑人也是不好的。徐特立 8.对人不尊敬,首先就是对自己的不尊敬。惠特曼

9.为人粗鲁意味着忘记了自己的尊严。车尔尼雪夫斯基 10.对人不尊敬的人,首先就是对自己不尊重。陀思妥耶夫斯基 11.对于应尊重的事物,我们应当或是缄默不语,或是大加称颂。尼采 12.尊重老师是我们中华民族的传统美德,我们每一个人都不应该忘记。xx 13.尊重劳动、尊重知识、尊重人才、尊重创造。《xx 大报告》 14.对别人的意见要表示尊重。千万别说:你错了。卡耐基 15.尊重人才,培养人才,是通用电器长久不败的法宝。杰克韦尔奇 16.君子之于人也,当于有过中求无过,不当于无过中求有过。程颐 17.施与人,但不要使对方有受施的感觉。帮助人,但给予对方最高的尊重。这是助人的艺术,也是仁爱的情操。刘墉 18.要尊重每一个人,不论他是何等的卑微与可笑。要记住活在每个人身上的是和你我相同的性灵。叔本华 19.要喜欢我们所不尊重的人是很难的;但要喜欢

数据压缩实验指导书

目 录 实验一用C/C++语言实现游程编码 实验二用C/C++语言实现算术编码 实验三用C/C++语言实现LZW编码 实验四用C/C++语言实现2D-DCT变换13

实验一用C/C++语言实现游程编码 1. 实验目的 1) 通过实验进一步掌握游程编码的原理; 2) 用C/C++语言实现游程编码。 2. 实验要求 给出数字字符,能正确输出编码。 3. 实验内容 现实中有许多这样的图像,在一幅图像中具有许多颜色相同的图块。在这些图块中,许多行上都具有相同的颜色,或者在一行上有许多连续的象素都具有相同的颜色值。在这种情况下就不需要存储每一个象素的颜色值,而仅仅存储一个象素的颜色值,以及具有相同颜色的象素数目就可以,或者存储一个象素的颜色值,以及具有相同颜色值的行数。这种压缩编码称为游程编码,常用(run length encoding,RLE)表示,具有相同颜色并且是连续的象素数目称为游程长度。 为了叙述方便,假定一幅灰度图像,第n行的象素值为: 用RLE编码方法得到的代码为:0@81@38@501@40@8。代码中用黑体表示的数字是游程长度,黑体字后面的数字代表象素的颜色值。例如黑体字50代表有连续50个象素具有相同的颜色值,它的颜色值是8。 对比RLE编码前后的代码数可以发现,在编码前要用73个代码表示这一行的数据,而编码后只要用11个代码表示代表原来的73个代码,压缩前后的数据量之比约为7:1,即压缩比为7:1。这说明RLE确实是一种压缩技术,而且这种编码技术相当直观,也非常经济。RLE所能获得的压缩比有多大,这主要是取决于图像本身的特点。如果图像中具有相同颜色的图像块越大,图像块数目越少,获得的压缩比就越高。反之,压缩比就越小。 译码时按照与编码时采用的相同规则进行,还原后得到的数据与压缩前的数据完全相同。因此,RLE是无损压缩技术。

相关主题
文本预览
相关文档 最新文档