Login
Password
Sources on this Page

> Headlines by Category

 Home / Science / Mathematics

You are using the plain HTML view, switch to advanced view for a more complete experience.

Re: imwrite to get .jpg image


"shahnaz fatima" <shahnaz1981fat@gmail.com> wrote in message
news:mi52p4$hjk$1@newscl01ah.mathworks.com...
> i have an image in a folder on desktop named : a1.jpg
> i am reading the image as: :
> a1=imread('C:UsersshahnazDesktopfingerprintprintsa1.jpg');
> after some operatins viz
>
> a1=rgb2gray(a1);
> a1=imresize(a1,0.25);
>
> i want to save this as 'newa1.jpg' using imread ( in a folder ,
> grayresize)
>>> imwrite(a1,'C:UsersshahnazDesktopfingerprintgrayresizeanew1','jpg');

You should include the extension in the filename as well as (or instead of)
specifying it as the format in the IMWRITE call.

*snip*

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
Re: inf values for mean(___) and sum(___) functions


"dpb" <none@non.net> wrote in message news:mi7p3j$i1p$1@dont-email.me...
> On 05/03/2015 8:52 PM, Christoph Meier wrote:
>> "dpb" wrote in message <mhnvpq$t64$1@dont-email.me>...
>>> On 04/27/2015 11:19 PM, Christoph Meier wrote:

*snip*

> idx=!(isnan(SHVOL) | isnan(SHROUT)); % NOT NaN in 'x' OR 'y'

dpb intended to use ~ instead of ! in the above line. The keys with those
two symbols are too close together ;)

*snip*

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
Re: curl like behavior natively?


"bbowler" <bbowler@bigelow.org> wrote in message
news:cqpa5pFsvskU1@mid.individual.net...
> I've written some code that needs to get data from a remote site. I
> currently have a way with curl, but that presupposes that curl is already
> installed on the machine that runs the code, which is not always the
> case. Is there a platform independent way in matlab to do the equivalent
> of
>
> curl -dsome.file http://some.url/
>
> (I asked this question a couple of years ago, and got no answers then, and
> I assume things haven't changed, but figured I ask again in case I missed
> something in the various updates from 2012b to 2015a)

It depends what type of data that is. If it's HTML data, take a look at
WEBREAD or WEBSAVE:

http://www.mathworks.com/help/matlab/import_export/downloading-web-content-and-files.html

If it's image data, look at IMREAD (which can accept a URL as the filename):

http://www.mathworks.com/help/matlab/ref/imread.html

If it's on an FTP site:

http://www.mathworks.com/help/matlab/ref/ftp-class.html

If it's data from a financial data source, check if it's one of the sources
supported by Datafeed Toolbox:

http://www.mathworks.com/products/datafeed/

If none of the above do what you're looking for, post some more details
about the type of data you're trying to retrieve and from where you're
trying to retrieve it.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
curl like behavior natively?
I've written some code that needs to get data from a remote site. I
currently have a way with curl, but that presupposes that curl is already
installed on the machine that runs the code, which is not always the
case. Is there a platform independent way in matlab to do the equivalent
of

curl -dsome.file http://some.url/

(I asked this question a couple of years ago, and got no answers then, and
I assume things haven't changed, but figured I ask again in case I missed
something in the various updates from 2012b to 2015a)

Thanks,
Bruce
Re: Finding good/optimal well-conditioned submatrices
In <mi7pv8$s7$1@newscl01ah.mathworks.com> "Bruno Luong" <b.luong@fogale.findmycountry> writes:

>Take a look at QR factorization with permutation. The condition number are the ratio between largest and smallest element of R.

Thanks! I'll read up on this.

kj
Finding good/optimal well-conditioned submatrices



NB: I apologize beforehand for the extreme cluelessness of the
question below. I'm indeed *very* new at this!



I have several (~1000) matrices of data, where the rows correspond
to feature vectors from the same feature space. Hence, all these
matrices have the same numbers of columns N, where N is roughly
500.[1]

For most of these matrices MATLAB's rcond function returns values
of the order of 1e-15. I.e. not good.

Therefore, I would like to eliminate some columns (i.e. features)
until the matrices have decent rcond values.[2]

Is there a principled (and computationally tractable[3]) approach
to doing this column elimination? If so, does MATLAB have any
functions devoted to this problem?

Many thanks in advance!

kj


[1] Their numbers of rows are not all equal, but hover around 10K.

[2] Unless there's a very good argument to the contrary I'd prefer
to eliminate features uniformly across all matrices.

[3] One approach that is principled enough (in my book at least)
but computationally unfeasible is an exhaustive enumeration of all
2^N elements in the power set of the set of columns, and picking
the largest one for which the min of rcond(m) as m ranges over all
these matrices exceeds some pre-specified threshold. The arbitrariness
of this threshold is a sticky point that may require an additional
helping of principle to properly deal with.
archimekai/matlabarraygen

generate an array that has a specified geometric mean, randomly

Re: Template matching
Aslak Grinsted" wrote in message <mi7c4o$s0o$1@newscl01ah.mathworks.com>...
> "Naveen Kumar" wrote in message <mi4tm0$6v0$1@newscl01ah.mathworks.com>...
> > I want to match a part of an image with the whole image in SIMULINK. I tried "TEMPLATE MATCHING" but i didn't understand how to use it.
> > The requirements:
> > 1. I need to compare a template image with a whole part of the image.
> > 2. It must compare and should generate a degree of similarity.
> > The block generates 3 types of outputs
> > -NxN matrix of the located values.
> > -Location
> > - and the neighbourhood matrix.
> > I dont understand which to choose for obtaining my requirement. I don't mind layers of processing, please help me out till the end, the output must be a degree of similarity.
> > ***Important***
> > I'm in need of an output value that provides me a degree of similarity of the template to an image. I m grateful to all the ladies and gentlemen who provide a solution, thank you.
>
> Our ImGRAFT toolbox has a templatematch function that you may be able to use. I do not have much experience in simulink, so it might not be exactly what you are looking for.
>
> Here's an example of using imgraft feature tracking in a matlab script. http://imgraft.glaciology.net/documentation/examples/cias-example
>
> You simply pass the centre coordinates of the features in image A that you want tracked in imageB and it will return the pixel displacement. You can also specify options such as the template size, and the search window size. We have tried to make it easy to use.

Thats an impressive job Mr. Aslak grinsted. I need more time to analyse the code. I think i should define this as coder.extrinsic in a simulink model. But it's quite complicated to use this because the application is on a robotic arm. But, Thanks for the knowledge.
Re: Does simulink real-time run succesfully with Apple computers?
Hi Raymond,

if you are referring to Simulink Desktop Real-Time, then yes, this
product runs with Mac OS X since MATLAB R2015a. And, a Thunderbolt
chassis with a PCI Express board inside is indeed a way how to connect
analog I/O to a Mac. Just please check the list supported boards to make
sure your board is supported.

BTW, even a native Thunderbolt data acquisition board exists and is
supported by Simulink Desktop Real-Time - please see
http://www.humusoft.com/datacq .

Best Regards, Jan


Raymond wrote:
> Hi,
> Was referring to "simulink desktop real time" not "simulink real time".
> Sorry for any confusion (but they do sound rather similar!).
> See here: http://uk.mathworks.com/products/simulink-desktop-real-time/
>
> Picture on website is an apple, i think. Click on "new features" tab for
> confirmation of apple compatibility.
>
> Im assuming from your message that you havent tried this yourself!
>
> Raymond
>
>
> Gordon Weast <gweast@mathworks.com> wrote in message
> <mhr5ol$fnm$1@newscl01ah.mathworks.com>...
>> Raymond,
>>
>> Simulink Real-Time is a Windows only product. Part of the preparation
>> of a model to run on the target uses some Windows only executables to
>> do that preparation.
>>
>> Where do you see a claim that it works on Mac? We need to correct that.
>>
>> Gordon Weast
>> Simulink Real-Time Development
>> MathWorks
>>
>> Raymond wrote:
>> > I currently use Real Time Desktop running on Windows. I am considering
>> > changing to an Apple MacBook Pro to do the same thing (since R2015a
>> > allows for this). Specifically, I want to connect to a PCI express DAQ
>> > board via the thunderbolt port.
>> > According to the matlab website, this is all possible using the most
>> > recent release. But my experience with software/hardware interfacing is
>> > that reality and theory often differ. Has anyone succesfully tried this
>> > (Real Time Desktop under Apple)?
>> >
>> > More generally, how well does Matlab R2015a behave under Mac OS 10 (I
>> > have read some complaints of slowness)?
>> >
>> > Thanks for any input.
>> > Raymond


--

--
Jan Houska HUMUSOFT s.r.o.
houska@humusoft.com Pobrezni 20
http://www.humusoft.com 186 00 Praha 8
tel: ++ 420 284 011 730 Czech Republic
fax: ++ 420 284 011 740
Re: Creat video object


Thank you

Problem solved
Post Selected Items to:

Showing 10 items of about 1300

home  •   advertising  •   terms of service  •   privacy  •   about us  •   contact us  •   press release design by Popshop •   Official PR partner B2BLogger.com •   © 1999-2015 NewsKnowledge