Date/Timestamp from...
 
Notifications
Clear all

Date/Timestamp from JPG Images

16 Posts
9 Users
0 Reactions
3,259 Views
(@arbert)
Active Member
Joined: 18 years ago
Posts: 14
Topic starter  

Working on a case that recorded old Motion Jpeg "video" and the FAT on the drive has been wiped/overwritten.

I'm dealing with about 16million recovered jpeg images carved from unallocated space. These are basically the frames in the video. Luckily (if you call it that) all the frames have date/timestamps on the top right hand corner of each image and the location being filmed in the top left hand corner of the physical image (no exiff data here).

My big problem is sorting through all these images. Of the 16million, 4 million are probably relevant (1 days worth). I've tried several different OCR processes to try and read the date/time from the actual image (I knew it was a long-shot because of the noise in the jpg) with no luck. Does anybody have any suggestions on any way to automate the "reading" of the timestamps on the actual image? Even some way to do a pattern match in a batch mode (haven't found any graphics programs that really work for what I need).

Any suggestions would be great.


   
Quote
(@kovar)
Prominent Member
Joined: 18 years ago
Posts: 805
 

Greetings,

This is outside of my area of expertise, but I'd try rendering the jpegs as something else that lends itself to OCR.

Pseudocode

foreach i in images
convert i to i.pdf
if (OCR(i.pdf) contains string
copy i to relevant
remove i.pdf
end

-David


   
ReplyQuote
Passmark
(@passmark)
Reputable Member
Joined: 14 years ago
Posts: 376
 

I would start by scripting / coding a process to crop the images down to just the top right corner. That is to say just the time stamp portion of the image.

With only the text in the, now much smaller, image the OCR process should be better and faster.

There might also be image filters that can help (e.g. improved contrast)

Posting one example frame might help people suggest other ideas.


   
ReplyQuote
(@Anonymous 6593)
Guest
Joined: 17 years ago
Posts: 1158
 

I've tried several different OCR processes to try and read the date/time from the actual image (I knew it was a long-shot because of the noise in the jpg) with no luck.

You probably can't use commercial products without preparation – they're tailored to text on paper, and pretty decent resolution. You might be able to train it, using something like ABBYY FineReader, but it is usually a question of character size and contrast. You don't say say anything about that, so it's difficult to be sure, but I would guess a) that the text is in the same position of the image, b) it's in a predetermined font and size, that is fairly restricted and completely known.

That kind of situation would lend itself to matrix matching, but it is a bit of a job to create that kind of application from scratch. And if you never have worked with image processing at this level, you will simply have to learn that from scratch, too.

I'd probably begin by trying to extract the relevant area from each picture, and depending on what it looks like do some averaging and sharpening transforms until it looks 'clean' (those things can be automated in most decent image processing software to allow a batch of image to be processed the same way), and then try to feed the result to a suitable OCR program, first for training purposes (can you even train it reasonably?), then for text extraction if training works well enough, for error esitmation (what degree of transcription errors does the process produce, and what degree can you live with?)

Scaling the extracted portion to get the glyphs large enough for the OCR software *might* work to some extent, but it's (again) a question of what it actually looks like.


   
ReplyQuote
Chris_Ed
(@chris_ed)
Reputable Member
Joined: 16 years ago
Posts: 314
 

Edit; misread post, nothing to see here )


   
ReplyQuote
(@mscotgrove)
Prominent Member
Joined: 17 years ago
Posts: 940
 

I presume you have checked the JPEG headers to see if the data has been stored there. Most still photos from cameras store this date information, but much less likely in video frames


   
ReplyQuote
keydet89
(@keydet89)
Famed Member
Joined: 21 years ago
Posts: 3568
 

OP mentioned that there is apparently no EXIF data available; what header fields are you referring to? I'd be interested in seeing if I could code something in Perl for a problem like this.

Thanks.


   
ReplyQuote
joakims
(@joakims)
Estimable Member
Joined: 15 years ago
Posts: 224
 

I see this as an interesting challenge too. Do you have a sample image to provide?


   
ReplyQuote
(@arbert)
Active Member
Joined: 18 years ago
Posts: 14
Topic starter  

I can definitely supply some samples, due to the nature though, I'd have to email them to anyone interested.

Definitely no header/exif data. Images are 720X240 8bit, YCbCr420, Huffman coded.

The super-imposed date/time/location do appear to be in the "exact" location on every frame


   
ReplyQuote
joakims
(@joakims)
Estimable Member
Joined: 15 years ago
Posts: 224
 

@arbert
Did you get my pm?


   
ReplyQuote
Page 1 / 2
Share: