Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Jackdonkey
May 31, 2007
What's it called when you take two images and take away all of the pixels are the same and take what's left to do math on? To see if an object moved. I want to use such a thing to determine range from a video camera.

Adbot
ADBOT LOVES YOU

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Jackdonkey posted:

What's it called when you take two images and take away all of the pixels are the same and take what's left to do math on? To see if an object moved. I want to use such a thing to determine range from a video camera.

computer vision, motion analysis, object tracking, frame differencing?

check out opencv, it does lots of things
like this: http://docs.opencv.org/3.1.0/de/de1/group__video__motion.html

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Jackdonkey posted:

What's it called when you take two images and take away all of the pixels are the same and take what's left to do math on? To see if an object moved. I want to use such a thing to determine range from a video camera.

What you probably want to look into is a cross-correlation of the two images, which should tell you how the object moved assuming that it still looks basically similar between the two frames (e.g. not heavily rotated or distorted by perspective).

Gravity Pike
Feb 8, 2009

I find this discussion incredibly bland and disinteresting.

Peristalsis posted:

Is there a better, more modern best practice for this? I've Googled a bit, but have only found descriptions of ETL solutions (which are well beyond the complexity I need for this, and which don't really solve the issue on a fundamental level) or multi-server indexing or something that I don't even understand.

The biggest problem with perpetually growing very-large tables, in my experience, is when the index no longer fits in memory, and the DB starts paging an index in and out of swap. Postgresql has a great solution for this: partial indexes. You can do something like
code:
CREATE INDEX myindex ON scheduled_texts(to_be_sent_on) WHERE is_sent = false
. The index only contains entries for a very small subset of the table's rows, which should easily fit in-memory.

Jackdonkey
May 31, 2007

TooMuchAbstraction posted:

What you probably want to look into is a cross-correlation of the two images, which should tell you how the object moved assuming that it still looks basically similar between the two frames (e.g. not heavily rotated or distorted by perspective).


peepsalot posted:

computer vision, motion analysis, object tracking, frame differencing?

check out opencv, it does lots of things
like this: http://docs.opencv.org/3.1.0/de/de1/group__video__motion.html

awesome guys, thank you.

LLSix
Jan 20, 2010

The real power behind countless overlords

Sab669 posted:

I have a DataTable with the following columns:

TableFieldID
EntityType
TableName
FieldName
Caption

TableName contains 3 letter abbreviations such as "ADT", "ADN", "rear end", "PAT" and a few others.

Caption contains "user friendly" values for various columns associated with the corresponding Table. Example being "Audit Create Date".

FieldName contains a string using the following "pattern": TableFieldID@EntityType#TableName.Caption except we remove any spaces from the Caption. So one of the values might be "49555@13#ADT.AuditCreateDate"

I need to remove all Audit-related items depending on the type of user that is logged in.

I was able to simply do something like this:

code:
myDataTable.Select("TableName LIKE 'ADT' OR TableName LIKE 'ADN' OR Caption LIKE '%Audit%'");
Then I just remove the returned collection from myDataTable.

This worked, until I realized there are columns which contain the string "audit", but aren't actually part of the set that should be removed, such as "Auditory Comprehension"

Any ideas on how I can deal with this? I can't add a space to my query -- '%Audit %' -- because then this will miss columns such as "Audited On".

There are over 1400 records in this result set, I don't really want to manually comb through this looking for exceptions to the rule but I think I might not have any options...

I don't do database work so I'm probably missing something obvious but why not something like
code:
myDataTable.Select("Caption LIKE '%Audit %' OR Caption LIKE '%Audits % OR Caption LIKE etc '");
So you have to figure out all the relevant variations on Audit (Audits, Audited, Auditing, Auditable, etc) by hand once but can then run your query as planned from now on. Uhhh, you probably don't want to include any checks on table name unless you are 100% certain nobody will ever have use a table name of ADN for Audible Dection of Nuisances or something else not audit related.

csammis
Aug 26, 2003

Mental Institution

peepsalot posted:

computer vision, motion analysis, object tracking, frame differencing?

check out opencv, it does lots of things
like this: http://docs.opencv.org/3.1.0/de/de1/group__video__motion.html

Those methods are all about foreground-background subtraction which requires learning or being told what is "background" and what isn't. If you can assume that everything in the foreground that you care about is definitely moving in every set of images you analyze, then this may work for you. If you don't know (or can't determine) what "background" means in your image set then you may want to look into object tracking. In OpenCV this involves selecting a set of points, usually by a feature detection algorithm like FAST, and running it through one of these methods.

Video analysis is the bulk of my work right now so feel free to ask questions jackdonkey!

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

csammis posted:

Those methods are all about foreground-background subtraction which requires learning or being told what is "background" and what isn't. If you can assume that everything in the foreground that you care about is definitely moving in every set of images you analyze, then this may work for you. If you don't know (or can't determine) what "background" means in your image set then you may want to look into object tracking. In OpenCV this involves selecting a set of points, usually by a feature detection algorithm like FAST, and running it through one of these methods.

Video analysis is the bulk of my work right now so feel free to ask questions jackdonkey!

Are there any libraries other than kinect for grabbing 3d pose information for humans out of an rgbd image? Looked around but couldn't find anything. If not, a short reading list would be appreciated if you're familiar with the domain.

csammis
Aug 26, 2003

Mental Institution
Unfortunately I don't have any knowledge of that area. The data I work with is meh-quality IP camera-style video streams. I wish I had depth information to work with as an additional data stream but I've been told it's "not feasible" to bolt Kinects on top of our cameras :v:

As for a reading list: I've never read any books on the topic. Most of my knowledge has come from OpenCV documentation and reading papers on whatever topics I have questions about. The PDFs I have right now are:

"Performance Metrics for Image Contrast" by Tripathi et al. I use an image contrast metric as a heuristic to determine the threshold I should pass in to feature detection. In an image with overall low contrast the feature detector has to be more sensitive because there are fewer contrasting regions to identify.

"A No Reference Objective Color Image Sharpness Metric" by Maalouf and Larabi. Same idea as the image contrast, plus I want to be able to report on objective metrics for image quality because the "eyeball test" really sucks for doing data-driven development.

"Detecting and Tracking Moving Objects in Video Sequences Using Moving Edge Features" by Karamiani et al.

"An Adaptive Optical Flow Technique for Person Tracking Systems" by Denman et al.

"A Contour-Based Moving Object and Tracking" by Yokoyama and Poggio.

The OpenCV documentation is fairly good about documenting its sources which is how I found Yokoyama and a couple others. It's also really goddamned useless at documenting how certain parameters affect the results of calculation which is why I had to look up the papers in the first place.

csammis fucked around with this message at 16:01 on Oct 21, 2016

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

csammis posted:

Unfortunately I don't have any knowledge of that area. The data I work with is meh-quality IP camera-style video streams. I wish I had depth information to work with as an additional data stream but I've been told it's "not feasible" to bolt Kinects on top of our cameras :v:

As for a reading list: I've never read any books on the topic. Most of my knowledge has come from OpenCV documentation and reading papers on whatever topics I have questions about. The PDFs I have right now are:

"Performance Metrics for Image Contrast" by Tripathi et al. I use an image contrast metric as a heuristic to determine the threshold I should pass in to feature detection. In an image with overall low contrast the feature detector has to be more sensitive because there are fewer contrasting regions to identify.

"A No Reference Objective Color Image Sharpness Metric" by Maalouf and Larabi. Same idea as the image contrast, plus I want to be able to report on objective metrics for image quality because the "eyeball test" really sucks for doing data-driven development.

"Detecting and Tracking Moving Objects in Video Sequences Using Moving Edge Features" by Karamiani et al.

"An Adaptive Optical Flow Technique for Person Tracking Systems" by Denman et al.

"A Contour-Based Moving Object and Tracking" by Yokoyama and Poggio.

The OpenCV documentation is fairly good about documenting its sources which is how I found Yokoyama and a couple others. It's also really goddamned useless at documenting how certain parameters affect the results of calculation which is why I had to look up the papers in the first place.

Thanks for the links. I'm trying to track people through a headset but don't have any background in image processing and everything is a bit :psyduck:

JawnV6
Jul 4, 2004

So hot ...

leper khan posted:

Thanks for the links. I'm trying to track people through a headset but don't have any background in image processing and everything is a bit :psyduck:

Well, to build up a background you just look for elements of the field that aren't changing over a large number of new samples.

csammis
Aug 26, 2003

Mental Institution

leper khan posted:

Thanks for the links. I'm trying to track people through a headset but don't have any background in image processing and everything is a bit :psyduck:

Keep in mind most of the papers and samples about tracking assume a stable POV where the tracking targets are moving relative to the camera but the camera is not moving relative to the targets. If you're trying to track people while swinging the POV around that becomes more difficult but not impossible! That video is using the OpenCV method calcOpticalFlowPyrLK for finding differences in individual points between frames. Depending on how well you can choose your initial tracking regions you might also want to look into MeanShift or CamShift.

Be confident and explore! I had absolutely no background in image processing prior to starting this current job eight months ago. It was definitely crazy for a while but once you dig in to how the various algorithms work and you start to know some of the lingo to aid in searching then it's pretty awesome.

JawnV6 posted:

Well, to build up a background you just look for elements of the field that aren't changing over a large number of new samples.

:haw:

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


So at work how normal is it, no matter how (un)developed your development processes, to feel like your team's projects are all held together by bubble gum, spit and prayer (mostly the latter)

Stinky_Pete
Aug 16, 2015

Stinkier than your average bear
Lipstick Apathy
...is there a version control system?

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


Got that much, yes

Sorry, just in a rotten mood after the exposure of some serious code flaws

El Kabong
Apr 14, 2004
-$10
I don't have any programming background, but I have a repetitive job that would be made a little easier if I could make a macro or something that would grab the text from the same spot of a website and execute a google search for it. What's a good place for me figure out how to make that?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

El Kabong posted:

I don't have any programming background, but I have a repetitive job that would be made a little easier if I could make a macro or something that would grab the text from the same spot of a website and execute a google search for it. What's a good place for me figure out how to make that?
AutoHotKey http://ahkscript.org/ is really good for general macro stuff.

You might also try Selenium which is specifically for browser automation (usually for automated QA testing of websites, but would probably also work for whatever you're doing).

peepsalot fucked around with this message at 23:19 on Oct 21, 2016

spiritual bypass
Feb 19, 2008

Grimey Drawer

Ciaphas posted:

Sorry, just in a rotten mood after the exposure of some serious code flaws

Your team programmed Comodo's OCR-reliant email verification system?

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


rt4 posted:

Your team programmed Comodo's OCR-reliant email verification system?

No but we used Rational ClearCase for CM for twenty years, seven of which I was onboard for

I'm sure that's somewhere on the scale of loving Awful

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


I do seriously wonder though if, at any other job, I'd still be feeling like everything I support is two degrees away from complete arsing disaster

(Then I think to myself I'd probably be the reason for that and down that road lies madness)

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
I assume that everything that's not critical life threatening is always about to blow up.

That's not to say critical life threatening things aren't the same way

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
Just because a given piece of code has worked for over a decade unmodified doesn't mean it's not about to spontaneously explode in a way that makes you go "wait, how did this ever work?"

Fergus Mac Roich
Nov 5, 2008

Soiled Meat

Ciaphas posted:

I do seriously wonder though if, at any other job, I'd still be feeling like everything I support is two degrees away from complete arsing disaster

(Then I think to myself I'd probably be the reason for that and down that road lies madness)

Embrace it. We all fight hard for our own two degrees.

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


TooMuchAbstraction posted:

Just because a given piece of code has worked for over a decade unmodified doesn't mean it's not about to spontaneously explode in a way that makes you go "wait, how did this ever work?"

Seems like this was every other day for me this week. Eesh.

Good to know I'm not entirely alone though :v:

Peristalsis
Apr 5, 2004
Move along.

Ciaphas posted:

So at work how normal is it, no matter how (un)developed your development processes, to feel like your team's projects are all held together by bubble gum, spit and prayer (mostly the latter)


Ciaphas posted:

I do seriously wonder though if, at any other job, I'd still be feeling like everything I support is two degrees away from complete arsing disaster

(Then I think to myself I'd probably be the reason for that and down that road lies madness)

In my experience, it's dishearteningly common.

ToxicFrog
Apr 26, 2008


Ciaphas posted:

I do seriously wonder though if, at any other job, I'd still be feeling like everything I support is two degrees away from complete arsing disaster

(Then I think to myself I'd probably be the reason for that and down that road lies madness)

Where I work, we have a saying:

"That's our secret. Production is always broken."

Part of that is just the scale we operate at -- once you have enough machines, hardware failures stop being surprises and start being continuous background noise -- but part of it is that everything is constantly being redesigned and rewritten and upgraded and modified and redeployed, and all of it is held together with spit and baling wire. And this has been true everywhere I've worked.

Writing software is like building a bridge, except the amount and kind of traffic it needs to support changes from day to day, as do the height of the river, the available materials, and the laws of physics.

Peristalsis
Apr 5, 2004
Move along.

ToxicFrog posted:

Where I work, we have a saying:

"That's our secret. Production is always broken."

Part of that is just the scale we operate at -- once you have enough machines, hardware failures stop being surprises and start being continuous background noise -- but part of it is that everything is constantly being redesigned and rewritten and upgraded and modified and redeployed, and all of it is held together with spit and baling wire. And this has been true everywhere I've worked.

Writing software is like building a bridge, except the amount and kind of traffic it needs to support changes from day to day, as do the height of the river, the available materials, and the laws of physics.

Yeah, it can be hard to make progress without breaking existing stuff, and realistically, if you insist on perfection before releasing updates, you'd just now be releasing your upgrade to use color monitors.

But it's also pretty common to be mired in old technology, have badly written code that nobody in management will allow to be fixed because there's no good business case to fix something that already works, and a culture of absolute disdain for ongoing training or use of best practices if it means the features won't go live as quickly as they will if you just throw something together and ship it out.

Hughlander
May 11, 2005

ToxicFrog posted:

Where I work, we have a saying:

"That's our secret. Production is always broken."

Part of that is just the scale we operate at -- once you have enough machines, hardware failures stop being surprises and start being continuous background noise -- but part of it is that everything is constantly being redesigned and rewritten and upgraded and modified and redeployed, and all of it is held together with spit and baling wire. And this has been true everywhere I've worked.

Writing software is like building a bridge, except the amount and kind of traffic it needs to support changes from day to day, as do the height of the river, the available materials, and the laws of physics.

Company I was at was in a partnership with AOL in the late '90s early '00s basically the height of their subscriber base. And I was talking to their NOC folks about monitoring, escalation policies etc... Their threshold for an alert was if more than 15% of their FTP servers were not taking traffic then that's a minor alert. They had full time people in their main data centers just going by, shutting down machines, replacing failed hard drives, and starting them back up. Can you imagine enough servers where that's a full time job?

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Hughlander posted:

Company I was at was in a partnership with AOL in the late '90s early '00s basically the height of their subscriber base. And I was talking to their NOC folks about monitoring, escalation policies etc... Their threshold for an alert was if more than 15% of their FTP servers were not taking traffic then that's a minor alert. They had full time people in their main data centers just going by, shutting down machines, replacing failed hard drives, and starting them back up. Can you imagine enough servers where that's a full time job?

What's the MTBF (mean time between failures) for your desktop machine? Maybe a few years? So if you have 1000 machines, then you'd expect one to fail every day or thereabouts. And 1000 machines is a pretty small datacenter.

I dunno that the average datacenter has someone whose full-time job is just finding machines with bad hardware, pulling them, and replacing, though. They're probably also responsible for the occasional reboot and new installation, after all. :v:

Dr Monkeysee
Oct 11, 2002

just a fox like a hundred thousand others
Nap Ghost

ToxicFrog posted:

Writing software is like building a bridge, except the amount and kind of traffic it needs to support changes from day to day, as do the height of the river, the available materials, and the laws of physics.

So nothing like building a bridge then.

I'm being glib but the real answer is that most software is a huge mess precisely because we're not building bridges. Software is infinitely malleable and almost never mission-critical which means our industry is incentivized to ship quickly and evolve requirements constantly. Since no one can predict the future the sum of decisions made yesterday that bite you today is very high.

If you work on software that can actually kill people if it breaks you will find that software engineering starts to resemble regular engineering: everything will take much longer, be checked and verified much more, and will be built on boring (read: safe, well-understood, battle-tested) technology.

ToxicFrog
Apr 26, 2008


Dr Monkeysee posted:

So nothing like building a bridge then.

:thejoke:

ufarn
May 30, 2009
is there a way to whitelist a folder in an S3 buckets using s3_website in s3_website.yml? I keep getting prompts on whether to keep /logs in my remote bucket when uploading from my laptop.

I know "exclude_from_upload" exists, but I don't know if there's a similar thing for (remote) whitelists.

Stinky_Pete
Aug 16, 2015

Stinkier than your average bear
Lipstick Apathy

TooMuchAbstraction posted:

What's the MTBF (mean time between failures) for your desktop machine? Maybe a few years? So if you have 1000 machines, then you'd expect one to fail every day or thereabouts. And 1000 machines is a pretty small datacenter.

Baloogan
Dec 5, 2004
Fun Shoe
I'm doing some rendering using DirectX 11 and I've got an general question about optimization

I've got to the point where for every game entity, (eg like walls and doods in game) I set texture, and world matrix and render a vertex at 0,0,0
My shader takes care of the rest of rendering the object

I've got a vertex buffer with one vertex in it at 0,0,0

So, for every game entity that shares the same texture:
I set texture
Then loop through all the game entities with the same texture
set world matrix
and finally render the vertex buffer with a single vertex in it


This strikes me as kinda stupid; but making a new vertex buffer so I can render all the game entity that share the same texture slows things down considerably too

I mostly write linear algebra and UI stuffs but driving a GPU is hard please help

(I'm using SharpDX, C#, .NET 4.6.something, x64 if it matters)

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I don't see a question.

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
This isn't really programming. What's the formula to increase or decrease the volume of something by a given amount? Multiplying a waveform by 50% doesn't make it sound literally half as loud. I'm completely failing to find the words to search for what I'm talking about.

I'm looking at these numbers in FL studio:



At 50% volume, it gives you 23% amplitude. Where does that 23% come from? e: At least I'm assuming that .23 is an amplitude, as that would correlate with the decibels.

baby puzzle fucked around with this message at 23:26 on Oct 23, 2016

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

baby puzzle posted:

This isn't really programming. What's the formula to increase or decrease the volume of something by a given amount? Multiplying a waveform by 50% doesn't make it sound literally half as loud. I'm completely failing to find the words to search for what I'm talking about.

I'm looking at these numbers in FL studio:



At 50% volume, it gives you 23% amplitude. Where does that 23% come from? e: At least I'm assuming that .23 is an amplitude, as that would correlate with the decibels.

The term you're looking for should be logarithm.

e: A page I found that does that calculation uses the following formulas:

code:

function Amplitude2dB(amplitude) {
	return 20 * Math.log(amplitude) / Math.LN10;
}

function dB2Amplitude(db) {
	return Math.pow(10, db / 20);
}
	
I'm not sure how FL maps decibels to percents, maybe someone else can enlighten.

carry on then fucked around with this message at 23:33 on Oct 23, 2016

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
I know how to get from dB to amplitude. I just don't see how -12.7db and 23% amplitude correspond to 50% volume. I'm missing something here.

I guess -12.7db is 50% of the way to negative infinity decibels? Maybe that's how I should be looking at it.

Baloogan
Dec 5, 2004
Fun Shoe

Suspicious Dish posted:

I don't see a question.

am i doing it right? it feels like im doing it wrong.

Adbot
ADBOT LOVES YOU

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

baby puzzle posted:

I know how to get from dB to amplitude. I just don't see how -12.7db and 23% amplitude correspond to 50% volume. I'm missing something here.

I guess -12.7db is 50% of the way to negative infinity decibels? Maybe that's how I should be looking at it.

Hearing isn't linear. Most audio equipment scales amplitude logarithmically to account for this.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply