COMPGROUPS.NET | Post | Groups | Users | Stream | Browse | About | |

### dividing an iamge into blocks and storing using indexing

• Permalink
• Email
• Follow

```i want to divide an image into blocks  and store each block with block location in the image.for example
image=[1     2     3     4;
5     6     7     8;
9    10    11   12;
13  14     15  16];divide it into blocks of size (2 x 2)
g(1,1)=[1 2;                                         g(1,2)=[3  4;
5 6];      //block(1,1)                              7 8];  //block(1,2)
same row of block but different coloum

g(2,1)=[9 10;                                      g(2,2)=[11 12;
13 14];   //block(2,1)                            15 16];   //block(2,1)
same coloum of block but different row
```
 0
Reply kamran 3/29/2010 5:22:02 AM

See related articles to this posting

```"kamran javed" <kamranpieas@gmail.com> wrote in message <hopddq\$3ac\$1@fred.mathworks.com>...
> i want to divide an image into blocks  and store each block with block location in the image.for example
> image=[1     2     3     4;
>            5     6     7     8;
>            9    10    11   12;
>            13  14     15  16];divide it into blocks of size (2 x 2)
> g(1,1)=[1 2;                                         g(1,2)=[3  4;
>             5 6];      //block(1,1)                              7 8];  //block(1,2)
>                                                               same row of block but different coloum
>
>
> g(2,1)=[9 10;                                      g(2,2)=[11 12;
>             13 14];   //block(2,1)                            15 16];   //block(2,1)
>                                                               same coloum of block but different row

stuff already available in the FEX...

http://www.mathworks.com/matlabcentral/fileexchange/14801

us
```
 0
Reply us 3/29/2010 5:29:04 AM

```kamran javed wrote:
> i want to divide an image into blocks  and store each block with block
> location in the image.for example
> image=[1     2     3     4;
>           5     6     7     8;           9    10    11   12;
> 13  14     15  16];divide it into blocks of size (2 x 2)

blkproc() if your processing doesn't need to know what the coordinates
are of the submatrix that you are processing.
```
 0
Reply Walter 3/29/2010 5:33:09 AM
 comp.soft-sys.matlab 203682 articles. 536 followers.

2 Replies
742 Views

Similar Articles

[PageSpeed] 25

• Permalink
• Email
• Follow

 Reply:

Similar Artilces:

Optimizer using MDC block index before accessing RID index
Hello, I have some large tables (over 100M rows on a non-partitioned database) that each have at least one good candidate for an MDC dimension. Am I right in assuming that if a query referencing an MDC table contains two predicates, one on the MDC dimension, and the other referencing a column in a RID index, the optimizer will only use the RID index to examine pages within qualifying MDC extents/blocks? Without MDC, I've often needed to include a commonly searched column in multiple indexes in order to flexible searches. My plan for MDC is to reduce the cost of many searches a...

Stored procedure won't use index
Hi, We're using SQL Server 2000. A very basic query on a 5 million row table would not work. If we hard coded the one input parameter, the query used the foreign key index and produced an instantaneous result. If, however, we pass the parameter in as a parameter, the query doesn't use the index and takes forever. E.g. Declare @ID int SET @ID = 17697 Select top 1 AccountID from tblAccounts where GroupID = @ID We have fixed the problem by using an index hint to force the query to use the index. However, my concern is - why is the index not automatically used when we remove the...

I want to use the index of an array (indicator) in block diagram programmatically.
Can I use the index of the array or must I build a pseudo index control for the array? If you want to programmatically set the index of the element displayed in the upper left corner of the array indicator (=the number(s) in the "index display" of the array indicator), create a property node for the array and write to "property: Index Values". (If this is not what you want, please use a few more sentences to explain your problem). u need set a local variable to the indicator You can create a property node (right click on the terminal or the index display on the front pa...

blocking CAS weirdo impl using plain load/store?
Humm... Section 3... http://www.cs.bgu.ac.il/~hendlerd/papers/RMR-constructions.pdf Not sure what to make of it. Membars anyone? :^| On 20 =D3=C5=CE=D4, 04:13, "Chris M. Thomasson" <n...@spam.invalid> wrote: > Humm... > > Section 3... > > http://www.cs.bgu.ac.il/~hendlerd/papers/RMR-constructions.pdf > > Not sure what to make of it. Membars anyone? As I understand it's not intended for frequent usage as built-in CAS. But, for example, one can choose "master" processor with this algorithm. If you don't have...

simulink
Hi, In simulink, during the run time of the simulation, I am trying to compute a state from the first 5 seconds of the data and then use that state as an initial condition of the delay block. Ex. I receive data for the first 5 seconds of the 60 sec simulation and by using these observations I compute the initial state of the my model(extended kalman filter). Then I want to use this initial state for the delay block of the recursion of the remaining 55 sec of simulation. I couldn't find a way to do this, to specify this initial state in the delay block, it gives the error that this...

C2000 DSP and Simulink : using a memory-stored variable as a block parameter
Hello, I've been toying with the C2000 toolbox for a little while now, but I'm hitting a wall on this one. What I'm trying to do is a PID controler whose parameters can be changed by an external source or using a RTDX channel. In fact this problem might arise for every block whose parameters can't be specified from the outside. Now I could create the controler with basic Simulink blocks, but I want to use to more efficient PID-Controler from the DMC library. Since the C2000 doesn't have a workspace, I tried to use the "Memory Copy" block from the Link for Cod...

Using where; Using index vs Using where
Hello, What are the difference between the following statements, which one is better? mysql> desc SELECT COUNT(*) as `cnt` FROM vote WHERE `ip` = INET_ATON('127.0.0.1') AND (`addtime` > NOW() - INTERVAL 1 DAY) ; +----+-------------+-------+-------+---------------+--------------- +---------+------+------+--------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+-------+---------------+--------------- +---------+------+------+--------------------------+ | 1 | S...

Why index used/not used
Hello. Explain. I have table "traf_raw" contains field "sip_id" (integer). This field indexed with "CREATE INDEX traf_raw_sip ON traf_raw (sip_id)". Question. When I try to get different rows postgres use index with one "sip_id" and not use index with another "sip_id". I don't understand why it is happen, but with more complex queries Seq Scan is so slowly. Example. With "sip_id='19'" there many rows in table, with "sip_id='29'" there is no rows. cnupm=> ANALYZE traf_raw;...

Fo:Block can you check to see if a block contains any text by using the block id?
Hi all Is there any chance you can check if a fo:block with an id of "Tips" contains any data. The problem I'm having is creating a fo:block then for-each node within one part of the xml I'm testing if scores match a particular high/Low then printing Tips. If there are no tips printed I would like to write a particular statements which says "No Tips" eg XML <Scale id="1" min="2" max="4">Statement 1</Scale> <Scale id="2" min="2.4" max="3.5">Statement 2</Scale> <Scale id="3...

SVM resync -- all blocks or used blocks?
On our V20Z with 2x73 GB drives, a SVM resync after replacing a failed disk takes about 75 minutes on fast disks. We are curious why this is so, even though there is only 500 MB allocated for the filesystems and 1 GB swap. So we're wondering if SVM resync touches every single physical block of the metadevice, regardless of allocated to data (in use) or not? -Dan Dan Foster wrote: > On our V20Z with 2x73 GB drives, a SVM resync after replacing a failed > disk takes about 75 minutes on fast disks. > > We are curious why this is so, even though there is only 500 MB > alloc...

index is not used when exists clause is used
Hi All, Here is the situation I met: CREATE TABLE t1(f1 NUMBER, f2 VARCHAR2(20)); CREATE UNIQUE INDEX i1 ON t1 ( f1 ); CREATE TABLE t2(f1 NUMBER,f2 VARCHAR2(10), t1f1 NUMBER); CREATE INDEX i2 ON t2(f1); after explain following SQL update t1 set f2 = 'abc' where exists(select 1 from t2 where t1.f1 = t2.t1f1 and t2.f1 = 1); The result: 0 UPDATE STATEMENT Optimizer=CHOOSE 1 0 UPDATE OF 'T1' 2 1 FILTER 3 2 TABLE ACCESS (FULL) OF 'T1' 4 2 TABLE ACCESS (BY INDEX ROWID) OF 'T2' 5 4 INDEX (RANGE SCAN) OF 'I2...

Resource (FMAPs) use when using block RAMs
Hello, I am trying to get acquainted with the amount of logic it takes to implement common structures to an FPGA. I built a simple VHDL 2x16bit memory like follows and targeted it to a xc4013 device (which includes block RAMs) ---- entity mem is port( Dr: in std_logic_vector(15 downto 0); wr: in std_logic; clock: in std_logic; clear: in std_logic; Rr: out std_logic_vector(15 downto 0); Ad: in std_logic_vector(1 downto 0) ); end mem; ------------------------------------------------------------------ architecture behv of mem is type ram_type is array (0 to 3) of std_logic_vector...

How to use backing store while using object graphics?
I don't know how to let IDL back store the display, note that I've written "device, retain=2" in the IDL_startup.pro file, and it works fine while using direct graphics. Here is an example, PRO test_gui COMPILE_OPT, IDL2 mywindow = OBJ_NEW('IDLgrWindow') ;;retain=2 myview = OBJ_NEW('IDLgrView', VIEWPLANE_RECT=[0, 0, 19, 19]) mymodel = OBJ_NEW('IDLgrModel') data = DIST(20) mycontour = OBJ_NEW('IDLgrContour', data, COLOR=[100, 150, 200], \$ C_LINESTYLE=[0, 2, 4], /PLANAR, GEOMZ=0, C_VALUE=INDGEN(20)) myview->Add, mymodel m...

divide image into blocks and preformcertain operation on each block
hi, I would like to thank every one help me in answering my questions i am working on project for fingerprint analysis and classification, I need to divide my image into blocks of size W x W where W=16 and find the variance of each block then display the variance image I use this operation to segment the foreground from the background I can not divide the image ,is there any one how can help me and I will be very thankful to all. alyaa. alyaa abdalhussein wrote: > hi, > I would like to thank every one help me in answering my questions > i am working on project for fingerprint anal...

The function, script, or class cannot be indexed using {} or . indexing
Hi there, (and a Happy New Year to the community) I am generating m file code using a perl script. The resulting m file looks like this: clear all pack hfig1 = figure(1); hold on grid on axis equal When I run it, I get the following error message in the matlab command window: ??? The function, script, or class atlantic_data cannot be indexed using {} or . indexing. Can someone give me a hint as to what might be the problem? Regards Dominique "Dominique Fleischmann" <splasher2001at@hotmaildot.com> wrote in message news:ef49bfe.-1@webcrossing.raydaftYaTP... > Hi ther...

Space used v blocks used
Come on then ladies and gents, sort this one out... Two systems with identical lv's and filesystems (ca_unictr and /unicentre). 'df -k' and 'du -sk' output from the systems: System 1 #df -k . Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/ca_unictr 163840 62788 62% 1686 5% /Unicentre #du -sk /unicentre 94088 /unicentre System 2 #df -k . Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/ca_unictr 163840 17428 90% 1664 5% /Unicentre #du -sk /unicentre 7876...

Which index to use
I have the following tables (simplified example): countries: code_country (char-4) , name_contry) breweries: code_brewery (int-4), name_brewery) coasters (code_coaster (char-8), description, code_country, code_brewery) code_coaster is formed by the combination from code_country + a correlative number: for example CH-33, INDO-102, etc How should I define the indexes so that the querries will be optimized? I've thought about the following: code_country: unique in table country code_brewery: unique in table brewery code_country: index in table coasters code_brewery: index in table coaste...

How to use as Functional Index to be used as Primary KEY
Hi, i searched the docs and the archives and was really wondering that i have not found anything searching for "functional index primary key". i would like to have a table of members with nicknames which are case-insensitive but i would like to save the user given name case-sensitive to display 'JimKnopf' instead of 'jimknopf': CREATE TABLE members ( nickname text NOT NULL, CONSTRAINT pk_test PRIMARY KEY (lower(name)) ); psql:scratch.sql:7: ERROR: syntax error at or near "(" at character 92 Of course i can use an index ...

use array index or values as index to fields to print
i've got a comma-separated file in which the first line is the header of each column and the remaining lines are data. i would like to scan the header for certain patterns and then print the selected columns. i've got most of it working, except for the printing of the correct fields. i'm not sure how to do this smartly. here's what i've got for a code so far. this one stores all indices of fields containing TT in the header in the array data_array. then (the failing part) on all following lines it should print the fields indicated by the array. BEGIN { FS = ",...

How to get a reference to a block (when no explicit block parameter is used?)
In a function, I can find out if a block was given using block_given?, but there's no way I can find to get hold of that block if it's there-- I can only yield to it, so far as I can tell. I know there has to be a method somewhere to do this, could some kind soul enlighten me? Many thanks, Ken Kenneth McDonald <kenneth.m.mcdonald@sbcglobal.net> wrote: > In a function, I can find out if a block was given using block_given?, > but there's no way I can find to get hold of that block if it's there-- > I can only yield to it, so far as I can tell. I know ther...

Dividing an image into 8X8 block and find histogram of each block
Hi, Can somebody help me with a code snippets to divide an image of size 352*288 to 8x8 blocks and to find histogram of each block? blkproc is not helping me as i need to access each block separately to find the histogram. A working code snippets will really help me. Thnaks in advance. Regards, Ayan "Ayan " <a.chaki@lycos.com> wrote in message <htnkf8\$j1j\$1@fred.mathworks.com>... > Hi, > Can somebody help me with a code snippets to divide an image of size 352*288 to 8x8 blocks and to find histogram of each block? blkproc is not helping me as i need to access ...

iterating through a block; declaring an index/counter within that block
Where does "food" come from in the example below? The declaration is within the block? The varaible food exists only within the block? What is (are) the value(s) for "food"? Read the following aloud to yourself. ['toast', 'cheese', 'wine'].each { |food| print food.capitalize } While this bit of code is less readable and sentence-like than the previous examples, I'd still encourage you to read it aloud. While Ruby may sometimes read like English, it sometimes reads as a shorter English. Fully translated into English, you might read the...

USE INDEX slower than letting MySQL find its own index
This result was unexpected, and I'm not sure if it's because of this specific query, or if USE INDEX isn't always a good idea. I'm running a MATCH-AGAINST query, like so: SELECT DISTINCT classifieds.id, title, classifieds_img.image, description, MATCH(username, category, subcat, make, model, year, price, title, description) AGAINST ('green car' IN BOOLEAN MODE) AS occurrences FROM classifieds USE INDEX (PRIMARY) JOIN classifieds_which USE INDEX (Count) ON classifieds_which.id = classifieds.id LEFT JOIN classifieds_img USE INDEX (ID) O...

HowTo find out used (useful) and unused (usesless) indexes?
Hi, Is there a way to find out what indexes are used(useful)/unused(useless) while the last few days/weeks? If possible so tell me a way via data dictionary without using any external tools. Andreas Mosmann -- wenn email, dann AndreasMosmann <bei> web <punkt> de On Apr 17, 4:38=A0am, Andreas Mosmann <mosm...@expires-30-04-2008.news- group.org> wrote: > Hi, > > Is there a way to find out what indexes are used(useful)/unused(useless) > while the last few days/weeks? > If possible so tell me a way via data dictionary without using any >...